Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation via pip produces error when importing numbalsoda #20

Open
kf120 opened this issue Nov 20, 2022 · 2 comments
Open

Installation via pip produces error when importing numbalsoda #20

kf120 opened this issue Nov 20, 2022 · 2 comments

Comments

@kf120
Copy link

kf120 commented Nov 20, 2022

Hi Nick, thank you very much for building this Python package, it definitely appears very promising!

I installed the latest version of numbalsoda (0.3.4) via pip and the installation was successful. I am using Python 3.9.7 and conda version 22.9.0.

However, when trying to import it, I get the following error:

'The procedure entry point ZSt28​__throw​_bad_array_new_lengthv could not be located in the dynamic link library C:\Users...\numbalsoda\liblsoda.dll'

Installing numbalsoda via conda (conda install -c conda-forge numbalsoda) solves the issue and the package is successfully imported into the Python script. Conda installs version 0.3.2, and thus I was wondering if the difference in the versions may play a role in this issue.

Thank you very much!

@jrenaud90
Copy link

jrenaud90 commented Jan 5, 2023

Hello!
I ran into a similar problem when installing from pip (numbalsoda v0.3.4) . When I go to import I get this error:

FileNotFoundError: Could not find module 'C:\<path to conda environment>\Lib\site-packages\numbalsoda\liblsoda.dll' (or one of its dependencies). Try using the full path with constructor syntax.

When I go into the directory I do see liblsoda.dll at the correct path. So it must be something it depends on?

I am on windows 10, python 3.9.15,

Like @kf120 found, I don't get this error if I use conda install for numbalsoda v0.3.2.

I also tried to install via pip forcing it to recompile rather than use the pre-built wheel.
pip install numbalsoda>=0.3.4 --no-binary="numbalsoda"

It installs okay but then I get the following error when I go to import,

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\envs\tpy39\lib\site-packages\numbalsoda\__init__.py", line 1, in <module>
    from .driver import lsoda_sig, lsoda, address_as_void_pointer
  File "C:\ProgramData\Anaconda3\envs\tpy39\lib\site-packages\numbalsoda\driver.py", line 21, in <module>
    liblsoda = ct.CDLL(rootdir+name)
  File "C:\ProgramData\Anaconda3\envs\tpy39\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

@linguo4
Copy link

linguo4 commented Sep 18, 2023

The error still occurs in the installation for Python 3.8/3.11 and numbalsoda version 0.3.4 and 0.3.3. Do you find any solutions?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants