no module named pil python что делать
python3—no module named PIL #3825
Comments
ljh0279 commented Nov 22, 2017
when i Loading and normalizing CIFAR10, said that ‘from PIL import Image
ModuleNotFoundError: No module named ‘PIL».
However, PIL only supports python2.7, how can i solve it?
The text was updated successfully, but these errors were encountered:
Gosicfly commented Nov 22, 2017
just try this:
pip3 install pillow
ljh0279 commented Nov 22, 2017
pillow is already installed. However, it does not work.
zou3519 commented Nov 22, 2017
I would recommend uninstalling Pillow, PIL (if they exist) and reinstalling pillow.
Something like:
ljh0279 commented Nov 22, 2017
ok. thank you! it works. I will post these questions to there in the future.
KingCyrus commented Nov 2, 2019
I would recommend uninstalling Pillow, PIL (if they exist) and reinstalling pillow.
Something like:
You saved my career! I have been on this for weeks. Thanks.
taulantisaku commented Nov 19, 2019
I would recommend uninstalling Pillow, PIL (if they exist) and reinstalling pillow.
Something like:
lukhuak commented Feb 23, 2020
Set path of NetBeans11.2 IDE to the interpreter anaconda in python 3.7.4
import cv2
import numpy as np
from PIL import Image
indolentdeveloper commented May 7, 2020
you might get below error in mac.
WARNING: The directory ‘/Users//Library/Caches/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that director
uaahacker commented Nov 21, 2020
C:\Users\uaahacker>pip uninstall Pillow
Found existing installation: pillow 7.2.0
Uninstalling pillow-7.2.0:
Would remove:
c:\users\uaahacker\anaconda3\lib\site-packages\pil*
c:\users\uaahacker\anaconda3\lib\site-packages\pillow-7.2.0.dist-info*
Proceed (y/n)? y
Successfully uninstalled pillow-7.2.0
C:\Users\uaahacker>pip uninstall PIL
WARNING: Skipping PIL as it is not installed.
C:\Users\uaahacker>pip install Pillow
Collecting Pillow
Downloading Pillow-8.0.1-cp38-cp38-win_amd64.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 261 kB/s
Installing collected packages: Pillow
Successfully installed Pillow-8.0.1
C:\Users\uaahacker>pip install PIL
ERROR: Could not find a version that satisfies the requirement PIL (from versions: none)
ERROR: No matching distribution found for PIL
Ali-Kamel commented Jan 10, 2021
I would recommend uninstalling Pillow, PIL (if they exist) and reinstalling pillow.
Something like:
isl-raph commented Sep 6, 2021
I would recommend uninstalling Pillow, PIL (if they exist) and reinstalling pillow.
Something like:
How to fix problem of «ModuleNotFoundError: No module named ‘PIL'»?
I tried with the solution given in ‘stackoverflow’, but not resolved.
I am trying to extract text from images with the help of pytesseract module from python.
The following are the steps I followed:
Now problem start as shown in the image uploaded here in.
Also showing error ‘ModuleNotFoundError : No module named «Image»‘
I am not able to fix this issue. Can anybody help on this error, to fix it?
3 Answers 3
It is saying that the module named Pillow(PIL) is missing. You can install it using pip. Enter the following in Command Line.
You are lacking the module Pillow. To install it you can run the following command in your command line:
Make sure you are doing this when your environment is active (after using the activate command), otherwise you will be installing it on your Python globally.
Some modules of Python are pre-installed, but no all. You can find modules index this official index. Then (if you have added pip to your path when you was installing Python), go to your terminal (cmd in Windows) and execute :
Then don’t forget to import it in your code
If you have want to share your projet, mark all modules used in a file named «requirements.txt» like that. Then the other user just have to execute
And modules will installed in the good version.