. Advertisement .
. Advertisement .
Hey geys, how are you today? I hope that you are all OK.
Today, I’m back here because I am getting a error: ”importerror: dll load failed: the specified module could not be found.” and I can’t find the best solution for it by myself, so I need to ask for your help. I am trying to use numpy in my code and here is the program I run:
import pylab File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module> from matplotlib.pylab import * File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 216, in <module> from matplotlib import mpl # pulls in most modules File "C:\Python25\lib\site-packages\matplotlib\mpl.py", line 1, in <module> from matplotlib import artist File "C:\Python25\lib\site-packages\matplotlib\artist.py", line 6, in <module> from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line 34, in <module> from matplotlib._path import affine_transform ImportError: DLL load failed: The specified module could not be found.
After I run, it returns an error:
ImportError: DLL load failed: The specified module could not be found.
Does anyone have any suggestions for my problem? Please suggest the best answer to solve it. Thanks!
This error happens because you are importing matplotlib.pylab with Python 3.5.1 on Win 64 but you don’t have Microsoft Visual C++ Redistributable packages for Visual Studio 2015 in your machine. Therefore, the error came out.
You can access to this link https://www.microsoft.com/en-us/download/details.aspx?id=48145 to install the Visual C++ Redistributable für Visual Studio 2015. Then the error will be solved.
Your problem can be resolved by another way. ( I found this way from the video: http://www.youtube.com/watch?v=xmvRF7koJ5E). Here is the process:
First, you need to download
msvcr71.dllfrom the web, then save them to your
C:\Windows\SysWOW64(if your operating system is 64-bit). Finally, let’s try running your code file in Python and the graph will be loaded in a few seconds.