- Notifications
You must be signed in to change notification settings - Fork15
Description
I'm having some trouble getting PySpice installed on my machine.
It compiles without warning:
$ CSPICE_SRC=/home/fmullall/apps/cspice/
$ export CSPICE_SRC
$ python setup.py build_ext
running build_ext
building '_spice' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/fmullall/apps/cspice/include -I/usr/include/python2.7 -c pyspice.c -o build/temp.linux-x86_64-2.7/pyspice.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/fmullall/apps/cspice/include -I/usr/include/python2.7 -c spicemodule.c -o build/temp.linux-x86_64-2.7/spicemodule.o
creating build/lib.linux-x86_64-2.7
gcc -pthread -shared build/temp.linux-x86_64-2.7/pyspice.o build/temp.linux-x86_64-2.7/spicemodule.o -L/home/fmullall/apps/cspice/lib -L/usr/lib64 -lcspice -lpython2.7 -o build/lib.linux-x86_64-2.7/_spice.so
and installs without incident:
$ python setup.py install --prefix=~/.local/
running install
running build
running build_py
creating build/lib.linux-x86_64-2.7/spice
copying spice/objects.py -> build/lib.linux-x86_64-2.7/spice
copying spice/init.py -> build/lib.linux-x86_64-2.7/spice
copying spice/misc.py -> build/lib.linux-x86_64-2.7/spice
running build_ext
running install_lib
copying build/lib.linux-x86_64-2.7/_spice.so -> /home/fmullall/.local//lib64/python2.7/site-packages
running install_egg_info
Removing /home/fmullall/.local//lib64/python2.7/site-packages/Spice-1.0-py2.7.egg-info
Writing /home/fmullall/.local//lib64/python2.7/site-packages/Spice-1.0-py2.7.egg-info
But when I run it, I get an error message:
$ PYTHONPATH=$PYTHONPATH:/home/fmullall/.local/lib64/python2.7/site-packages/
$ python -c 'import spice'
Traceback (most recent call last):
File "", line 1, in
File "spice/init.py", line 3, in
from misc import *
File "spice/misc.py", line 3, in
from _spice import *
ImportError: dynamic module does not define init function (init_spice)
The readme files suggests this might be a 32/64 bit problem, but cspice
is compiling 64 bit as well, as best I can tell. Any ideas what I'm doing wrong?