Reputation: 1
pip install pillow
>>> Requirement already satisfied: pillow in c:\users\miguel\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (8.3.1)
import pillow
>>> Traceback (most recent call last):
File "C:\Users\Miguel\PycharmProjects\Testing\main\__init__.py", line 1, in <module>
import pillow
ModuleNotFoundError: No module named 'pillow'
for some reason I can't use any downloaded libraries on Pycharm without getting this error. Tried searching it up but with no answers. I think it must be some sort of pathing error. any suggestions?
Upvotes: 0
Views: 125
Reputation: 155
There are 2 possible answers : While the name of the package is pillow, it is a replacement for PIL and uses the PIL for the name of the base module
the usual way to use pillow is
from PIL import Image
im = Image.open("filename")
Open up your Project Interpreter (⌘ + , on Mac).
At the bottom of this page you'll see the + symbol to the left of the anaconda logo. This will create a pop-up that allows you to search for available packages.
In this new window, search for 'Pillow'.
Click and Install Package.
Upvotes: 1