Skip to content Skip to sidebar Skip to footer

Dll Load Failed With Scipy.optimize?

I'm trying to upload the curve_fit from scipy.optimize to fit an exponential function to some data I have generated. My code looks like: import matplotlib.pyplot as plt import nump

Solution 1:

I encountered the error

    from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.

when using cgoehlke's "Unofficial Windows Binaries for Python Extension Packages" for SciPy with a pip3-installed NumPy, overlooking this note:

Many binaries depend on NumPy-1.9+MKL and ...

Their NumPy provides the missing DLLs / modules.


Solution 2:

I've run into several problems like this recently when trying to use pyplot and scipy. I have Anaconda 2.7, 32bit running on Windows 7 x64

I just encountered this exact error whilst trying to use curve_fit. I downloaded the 'superpack' from sourceforge: http://sourceforge.net/projects/scipy/

Running this installer fixed the error and didn't affect any other part of my python environment.


Solution 3:

I was suffering from exactly the same problem.

from scipy.optimize import minpack2

I reinstalled numpy and MLK but still got this error on Pycharm. I directly update my python to 3.6 and now the problem is solved. During the procedure, use

conda install python=3.6

Since

conda update python

showed me that I already have the 3.5.2, which means conda update failed to update from 3.5 to 3.6 and it is supposed to be capable of upgrading from versions like 3.5.1-->3.5.2 I think. Hope this could help. Plus, remember to reset the environment after the update.


Solution 4:

Not sure if this is an answer for you, because this error can mean so many things... I've been there...

I just had the same error (also while loading Scipy optimize) just 10 minutes ago with a fresh install of Miniconda for Python 3.3 on a Vista x64 machine. Somehow it failed to add the main Python directory to the Windows PATH (and I'm pretty sure I didn't uncheck the box for it at the end of the installation).

I did the same procedure on some XP and Windows 7 machines earlier this week without any problems, so i caught me a bit by surprise.

If you have no other Python installation on your machine, you can check if running 'python' (type win-key + r, or do it from command prompt) works. If it doesn't, simply add your main installation directory (where python.exe is located) to your PATH variable.

If this doesn't work you could use Dependency Walker to check which DLL the error message is actually about, and then see if that DLL is present somewhere within your PATH or PYTHONPATH.

I have had the same DLL error when multiple versions of the same DLL were compiled with different compilers and the required version wasn't found first. If removing a version (the program it came with) isn't an option, changing the order of your PATH variable can help.


Solution 5:

This is most likely you installed 32-bit Python but 64-bit libraries or vice versa.

You need to remove Python and reinstall correct python.

https://www.python.org/download/

Here you can download Python.

Remember you python libraries should be the same 32bit or 64bit as the one of Python.


Post a Comment for "Dll Load Failed With Scipy.optimize?"