AndrewAnnex / SpiceyPy

SpiceyPy: a Pythonic Wrapper for the SPICE Toolkit.
MIT License
384 stars 84 forks source link

[WinError 126] The specified module could not be found #444

Closed gfferran closed 2 years ago

gfferran commented 2 years ago

Following @AndrewAnnex 's answer in #242 , I installed SpiceyPy through: pip install spiceypy --no-cache-dir --no-binary :all:

Then, when I try to import, this error appears:

Traceback (most recent call last):
  File ".\test_spiceypy.py", line 2, in <module>
    import spiceypy
  File "C:\Python37\lib\site-packages\spiceypy\__init__.py", line 27, in <module>
    from .spiceypy import *
  File "C:\Python37\lib\site-packages\spiceypy\spiceypy.py", line 36, in <module>
    from .utils.libspicehelper import libspice
  File "C:\Python37\lib\site-packages\spiceypy\utils\libspicehelper.py", line 57, in <module>
    libspice = CDLL(libspice_path)
  File "C:\Python37\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

This is the setup:

AndrewAnnex commented 2 years ago

hey @gfferran, I thought I replied to this over email but it looks like it never got sent. Your python is 32-bit and is unsupported by spiceypy. Since you are using windows 10, you should be able to install a 64 bit version of python from python.org, and then you can simply run pip install spiceypy without all the options from that old issue.

AndrewAnnex commented 2 years ago

closing this issue for lack of updates

gfferran commented 2 years ago

Thank you for your reply, Andrew, it worked. Sorry for the late reply.

AndrewAnnex commented 1 year ago

Hi Fernando,

That advice is 5 years out of date. Uninstall spiceypy, then reinstall it using just “pip install spiceypy” without those additional options

-Andrew Annex

On Apr 2, 2022, at 5:18 AM, Ferran @.***> wrote:

 Following @AndrewAnnex 's answer in #242 , I installed SpiceyPy through: pip install spiceypy --no-cache --no-binary :all:

Then, when I try to import, this error appears:

Traceback (most recent call last): File ".\test_spiceypy.py", line 2, in import spiceypy File "C:\Python37\lib\site-packages\spiceypy__init__.py", line 27, in from .spiceypy import * File "C:\Python37\lib\site-packages\spiceypy\spiceypy.py", line 36, in from .utils.libspicehelper import libspice File "C:\Python37\lib\site-packages\spiceypy\utils\libspicehelper.py", line 57, in libspice = CDLL(libspice_path) File "C:\Python37\lib\ctypes__init.py", line 356, in init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.