I have installed Anaconda (with the packages that come with it) and VS Code (from within the Anaconda Navigator). If I open VS Code from the Anaconda Navigator or from The Anaconda Prompt, every import
works well.
But if I open VS Code directly, it throws an ImportError
.
For example:
from PIL import Image
Gives the following error:
Traceback (most recent call last):
File "c:MyProgramsCodingScriptsimageOperations.py", line 7, in
<module>
from PIL import Image
File "C:MyProgramsCodingSoftwarePythonlibsite-
packagesPILImage.py", line 93, in <module>
from . import _imaging as core
ImportError: DLL load failed: The specified module could not be found.
How do I fix this problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…