numbalsoda icon indicating copy to clipboard operation
numbalsoda copied to clipboard

Installation via pip produces error when importing numbalsoda

Open kf120 opened this issue 2 years ago • 2 comments

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!

kf120 avatar Nov 20 '22 23:11 kf120

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

jrenaud90 avatar Jan 05 '23 19:01 jrenaud90

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

linguo4 avatar Sep 18 '23 00:09 linguo4