Issue
I'm running vscode on windows with anaconda. All packages I've tried importing including pandas,sys, os work fine. Except one.
When I run conda list this is my output which includes matplotlib:
.
.
libxslt 1.1.37 h2bbff1b_0
libzlib 1.2.13 hcfcfb64_5 intel
matplotlib 3.7.1 py310haa95532_1
matplotlib-base 3.7.1 py310h4ed8f06_1
matplotlib-inline 0.1.6 py310haa95532_0
mkl 2023.2.0 intel_49496 intel
.
.
Trying to import the module to use in vscode gives me the error:
Traceback (most recent call last):
File "C:\Users\tarus\pyenvs\epictardownloader.py", line 34, in <module>
import matplotlib
File "C:\Users\tarus\anaconda3\envs\housingenv\lib\site-packages\matplotlib\__init__.py", line 131, in <module>
from . import _api, _version, cbook, _docstring, rcsetup
File "C:\Users\tarus\anaconda3\envs\housingenv\lib\site-packages\matplotlib\rcsetup.py", line 27, in <module>
from matplotlib.colors import Colormap, is_color_like
File "C:\Users\tarus\anaconda3\envs\housingenv\lib\site-packages\matplotlib\colors.py", line 51, in <module>
from PIL import Image
File "C:\Users\tarus\anaconda3\envs\housingenv\lib\site-packages\PIL\Image.py", line 103, in <module>
from . import _imaging as core
ImportError: DLL load failed while importing _imaging: The specified module could not be found.
I've tried reinstalling the package several times with several different versions, reinstalling vscode, making a new conda environment and installing the packages there, reinstalling with pip. None of it worked. I really can't think of anything else to do.
Solution
Based on the stack trace, the problem is with PIL (pillow library). Perhaps you can try to (re)install that one manually
Answered By - Frank Van Geirt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.