Window 7, Python 3.6.5
, while importing based on python, reports the following error:
>> from PIL import Image Traceback (most recent call last): File "<ipython-input-12-0f6709e38f49>", line 1, in <module> from PIL import Image File "d:\ProgramData\Anaconda3\lib\site-packages\PIL\Image.py", line 58, in <module> from . import _imaging as core ImportError: DLL load failed: 找不到指定的模块。
sometimes, a similar error is reported:
>> from PIL import Image Traceback (most recent call last): File "<ipython-input-13-0f6709e38f49>", line 1, in <module> from PIL import Image ImportError: cannot import name 'Image'
such problems are generally when installing the library, the security is not complete, or the installed library is overwritten or broken, so the corresponding class library cannot be known.
C:\Users\xxxx\>pip install Pillow Requirement already satisfied: Pillow in d:\programdata\anaconda3\lib\site-packages (5.0.0) C:\Users\xxxx>pip show Pillow Name: Pillow Version: 5.2.0 Summary: Python Imaging Library (Fork) Home-page: http://python-pillow.org Author: Alex Clark (Fork Author) Author-email: [email protected] License: Standard PIL License Location: d:\programdata\anaconda3\lib\site-packages Requires: Required-by:
as you can see from the instructions above, the class library is already installed. But because it has a problem, it needs to be reinstalled.
pip uninstall Pillow
Uninstalling Pillow-5.0.0: Would remove: d:\programdata\anaconda3\lib\site-packages\pillow-5.0.0.dist-info\* Proceed (y/n)?y Successfully uninstalled Pillow-5.0.0
and then reinstall :
pip install Pillow
Collecting Pillow Downloading https://files.pythonhosted.org/packages/1b/50/869910cd7110157fbefd0fed3db3656c1951f1bceecdd00e3716aa269609/Pillow-5.2.0-cp36-cp36m-win_amd64.whl (1.6MB) 100% |████████████████████████████████| 1.6MB 69kB/s Installing collected packages: Pillow Successfully installed Pillow-5.2.0
and then re-import the Image to see that everything is fine.
if it has been installed but cannot be found, the high probability is that the installation is damaged and needs to be reinstalled.
- Sdl2 – importerror: DLL load failed: the specified module was not found.
- from ._ NNLS import NNLS importerror: DLL load failed: the specified module was not found.
- After tensorflow installation, an error occurred while importing: importerror: DLL load failed: the specified module could not be found
- tensorflow import error: DLL load failed: The specified module could not be found (DLL load failed: The specified module could not be found)
- ImportError: DLL load failed: The specified module could not be found
- Python error: importerror: DLL load failed: unable to find the specified module solution
- OpenCV3.1 + Python2.7 error “DLL load failed: The specified module could not be found”
- Importerror using tensorflow: DLL load failed: the specified program cannot be found
- Finally solved the importError: DLLload failed: the specified module could not be found when import matplotlib.pyplot
- Tensorflow import error: DLL load failed: the specified module could not be found
- Python import GDAL failed: DLL load failed. The specified module cannot be found.
- Oserror: [winerror 126] the specified module was not found. Pytoch couldn’t find caffe2_ detectron_ ops.dll
- vscode import numpy error：DLL load failed: The specific module could not be found
- Error loading Python DLL ‘python36.dll’. LoadLibrary: The specified module could not be found.
- How to solve “import cv2 failed ImportError: DLL load fail: Cannot find the specified module” in Anaconda environment
- Ntpdate reported an error when updating the clock, and the problem of no server suitable for synchronization found was solved
- Jumper notebook, import numpy, prompt “importerror: DLL load failed: unable to find the specified module”
- Because vcruntime140 was not found_ 1.dll, unable to continue code execution
- Windows10解决ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed
- After vivado joined ILA, the [DRC lutlp-1] problem of error problem was solved