AndrewAnnex / SpiceyPy

SpiceyPy: a Pythonic Wrapper for the SPICE Toolkit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spiceypy/utils/spice.so image not found when trying to import spiceypy from script

jmend327 opened this issue · comments

Hello, I receive the following error when trying to import spiceypy:

Traceback (most recent call last): File "/Users/Owner/spitest.py", line 1, in <module> import spiceypy File "/usr/local/lib/python2.7/site-packages/spiceypy/__init__.py", line 25, in <module> from .spiceypy import * File "/usr/local/lib/python2.7/site-packages/spiceypy/spiceypy.py", line 27, in <module> from .utils.libspicehelper import libspice File "/usr/local/lib/python2.7/site-packages/spiceypy/utils/libspicehelper.py", line 34, in <module> libspice = CDLL(sitePath) File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(/usr/local/lib/python2.7/site-packages/spiceypy/utils/spice.so, 6): image not found

I installed through pip install spiceypy. If it helps, nothing is returned when I type in which spiceypy either. Any help would be appreciated, thanks!

to further explain, there is some odd interaction with pip and setuptools from my experience last night, this issue occurred when pip assumes to use bdist_wheel instead of install so it skips building the spice shared library (spice.so). I think this can be fixed by overriding the bdist_wheel behavior or maybe there is a better way to do this.

Oh I see, thanks. I get this error when trying to run pip install spiceypy —no-cache-dir:

Invalid requirement: '—no-cache-dir'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 82, in init
req = Requirement(req)
File "/usr/local/lib/python2.7/site-packages/pip/_vendor/packaging/requirements.py", line 96, in init
requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "'\xe2\x80\x94no-ca'"

The first dash should really be two dashes ie --no-cache-dir I think my email changed the character. That error just means the command is not recognized due to the typo.

That worked, thanks!