skip to Main Content

I knew that pypy is faster than CPython so I wanted to try it and it is actually way faster than CPython, however when I install libraries it shows the following:

PS C:UsersDELLDesktoptelegrampython -work some-> pip install pillow
Requirement already satisfied: pillow in c:usersdellappdataroamingpythonpython39site- 
packages (8.3.0)

but when I try to import the module (pillow):

Traceback (most recent call last):
  File "c:/Users/DELL/Desktop/telegram/python -work some-/studying code 2.py", line 1, in 
 <module>
import pillow
ModuleNotFoundError: No module named 'pillow'

it is not there! please help!

2

Answers


  1. pillow is an up-to-date fork of the now deprecated Python Image Library (PIL). you need to import PIL or from PIL import ... to use it.
    Check out their documentation to learn more!

    Login or Signup to reply.
  2. You must run pip with the version of Python you want to install the package for. In this case, you need pypy3 -m pip install pillow or something similar—run it with the same interpreter as the script you’ll run next. In your pasted output, we see Requirement already satisfied: pillow in c:usersdellappdataroamingpythonpython39site-packages which is the path for CPython 3.9, not PyPy.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search