Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No module named 'Pillow'
#1
I get the message ModuleNotFoundError: No module named 'Pillow'
I get the following from pip show Pillow
Name: Pillow
Version: 5.4.1
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: c:\users\major\appdata\roaming\python\python37\site-packages
Requires:
Required-by: anki-vector
I am trying to run a python file that uses anki_vector.
I have re-installed python and confirm I have a PYTHONPATH environment variable containing the paths to the installed python DLLs and Lib folders.
Do I need to add the path to the site-packages in my user area?
Reply
#2
Although it's called pillow you import PIL
https://pillow.readthedocs.io/en/stable/...orial.html
Reply
#3
Ok thanks.
I asked as I got a Cannot import from PIL and to do a pip3 install Pillow and thought I would be able to do a quick test of Import Pillow.

Now all I have to do is find out which py file the failing Import is in.
Reply
#4
(May-10-2019, 01:27 PM)MrMajorThorburn Wrote: I have re-installed python and confirm I have a PYTHONPATH environment variable containing the paths to the installed python DLLs and Lib folders.
Look as this to make sure all is correct Python 3.6/3.7 and pip installation under Windows

A basic test of python and pip from command line.
C:\>python -V Python 3.7.3 C:\>python -c "import sys; print(sys.executable)" C:\python37\python.exe # See that pip point to 3.7 C:\>pip -V pip 19.1.1 from c:\python37\lib\site-packages\pip (python 3.7)
So now will pip install Pillow only install to Python 3.7.
A quick test i use virtual environment as a already have Pillow installed before.
# Install (key_env) E:\div_code\key_env λ pip install Pillow Collecting Pillow ..... Installing collected packages: Pillow Successfully installed Pillow-6.0.0 # Test (key_env) E:\div_code\key_env λ python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. # The import is still PIL as mention before >>> from PIL import Image >>> Image.__version__ '6.0.0' >>> im = Image.open("22.jpg") >>> print(im.format, im.size, im.mode) JPEG (930, 288) RGB >>> exit()
Reply
#5
Ok. thanks for that.
I am now sorted.
I used grep to find the file(s) that showed me the message about import PIL and have downloaded and installed the latest version of the associated package(s) and I now get to the actual messages from the py file I was testing so I am good to move on now.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using moviepy fails due to "ModuleNotFoundError: No module named 'pip._internal.utils sheepog 2 2,259 May-28-2025, 06:57 PM
Last Post: sheepog
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 3 5,026 May-10-2025, 05:56 PM
Last Post: Wimpy_Wellington
  ModuleNotFoundError: No module named 'tkcalendar', Thonny, Windows 10 Edward_ 4 5,340 Apr-06-2025, 07:56 PM
Last Post: Edward_
  No module named 'importlib.metadata' EdVS 3 3,044 Jan-30-2025, 09:55 AM
Last Post: Larz60+
  ModuleNotFoundError: No module named 'athena_read' raman 2 2,305 Jul-01-2024, 07:52 AM
Last Post: Gribouillis
  no module named 'docx' when importing docx MaartenRo 1 8,922 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 34,917 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 15,444 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 7,019 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 5,250 Aug-07-2023, 05:32 AM
Last Post: DPaul

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.