Open kalefranz opened 8 years ago
You probably have some other library getting in the way earlier on PATH. The easiest way to avoid this is to create an environment. Activating an environment puts the correct entries on PATH first. If this still doesn't work, then there are bad libraries in Windows\System32. Qt libraries, for example, do not belong there.
Creating a virtual environment helped, but my PATH has Anaconda at the top. Shouldn't that work?
PATH = C:\Anaconda3;C:\Anaconda3\Scripts;C:\Anaconda3\Library\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32; ...
If creating a conda environment helped, then having Anaconda at the front of PATH should also work. Is it always at the front of PATH, or only after activation?
It is always at the front in my system!
OK, I can't explain why an environment works any better. You might be able to figure out which DLLs are misbehaving using http://www.dependencywalker.com/ - you should be able to load any of matplotlib's pyd files and take a look at which dependencies may not be getting loaded correctly.
Note that DLLs in Windows\System32 are found before anything on PATH, so having 3rd party stuff installed there can break many things: https://msdn.microsoft.com/en-us/library/7d83bc18.aspx
Thanks for the tips. I'll follow up on these suggestions. At least I can some work done now. I appreciate your help.
I'm unable to reproduce this error. However, Dependency Walker is telling me that the _image
extension can't find API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
and several DLLs with the prefix API-MS-WIN-CORE-WINRT
. That said, I'm able to import matplotlib.pyplot
without issue, and import matplotlib._image
as well.
Dependency Walker usually shows a several erroneous dlls as "not found". On my machine I see a bunch of dlls starting with "API-MS-WIN" and "EXT-MS-WIN" for numpy.core.multiarray, but everything works fine anyway.
Indeed. Though it did help us track down another issue, so it was worth a shot!
Oh yes, it's extremely useful. I'm just saying that not all of the errors it shows are actually correct.
From @nihalarju on March 8, 2016 19:0
With Anaconda, trying to import matplotlib.pyplot leads to error:
Version and system info: Python 3.5.1 |Anaconda 2.5.0 (64-bit)| [MSC v.1900 64 bit (AMD64)] on win32
Tried:
with no effect.
Thanks for looking into this.
Copied from original issue: conda/conda#2204