3

I installed numexpr and pytable using .whl. Installation looked fine but dll import failure keeps coming. Here are the installation details.

PS E:\> pip install --use-wheel --no-index --find-links=.\ numexpr-2.4-cp27-none-win32.whl
Ignoring indexes: https://pypi.python.org/simple
Processing e:\numexpr-2.4-cp27-none-win32.whl
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6 in c:\python27\lib\site-packages\numpy-1.7.0-py2.7-
win32.egg (from numexpr==2.4)
Installing collected packages: numexpr

--- when using numexpr in pytable ---

E:\bf\pycon2013-master\pycon2013-master>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> from numexpr import interpreter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\numexpr\__init__.py", line 41, in <module>

    from numexpr.expressions import E
  File "C:\Python27\lib\site-packages\numexpr\expressions.py", line 46, in <modu
le>
    from numexpr import interpreter
ImportError: DLL load failed: The specified module could not be found.
Nilesh
  • 20,521
  • 16
  • 92
  • 148
Kumar Deepak
  • 473
  • 4
  • 18

2 Answers2

2

I had a very similar problem and after a couple of hours, I was able to fix it. I'm sharing my fix and hope it may help someone else like me.

Go to the site below:

https://www.lfd.uci.edu/~gohlke/pythonlibs/

Then download

1) numpy+mkl (it is different from numpy! as Marcel noted)

2) Visual C++ 2017 (x64 or x86 for CPython 3.5, 3.6, and 3.7) redistributable packages (you can find the link on the site above)

3) numexpr

4) pytables

Download the right version for you.

For me it is

numpy‑1.15.3+mkl‑**cp37‑cp37**m‑win_amd64.whl

Since my python version is 3.7

Then from cmd(admin) change directory to the folder where whl is located.

cd 'c:/folder/'

Then run

pip install numpy‑1.15.3+mkl‑cp37‑cp37m‑win_amd64.whl

and so forth.

Alfe
  • 56,346
  • 20
  • 107
  • 159
Matthew Son
  • 1,109
  • 8
  • 27
  • This method works for me. And this link [ https://www.lfd.uci.edu/~gohlke/pythonlibs/] is amazing!! Thanks a lot! – Hong Cheng Mar 04 '21 at 00:47
1

I found this reference to the fact that numexpr expects numpy + MKL to be present. I've not found any other documentation to this fact.

I had an older version of numpy 1.7.0 from Chris Golkhe numpy-1.7.0-win32-superpack-python2.7.exe which unfortunately I have no idea if that included MKL or not.

I uninstalled the old numpy and installed numpy‑1.9.2+mkl‑cp27‑none‑win32.whl via pip and numexpr imports without issue now.

I am unsure if my problem was older numpy or if it was actually something to do with MKL. Either way, installed a more recent binary fixed it.

Marcel Wilson
  • 3,842
  • 1
  • 26
  • 55
  • I think the package "numpy+mkl" is important. Since it is said in that link "Many binaries depend on numpy+mkl and the current Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 for Python 3, or the Microsoft Visual C++ 2008 Redistributable Package x64, x86, and SP1 for Python 2.7. Install numpy+mkl before other packages that depend on it." – Hong Cheng Mar 04 '21 at 00:49