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
pillow
is an up-to-date fork of the now deprecated Python Image Library (PIL
). you need toimport PIL
orfrom PIL import ...
to use it.Check out their documentation to learn more!
You must run
pip
with the version of Python you want to install the package for. In this case, you needpypy3 -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 seeRequirement already satisfied: pillow in c:usersdellappdataroamingpythonpython39site-packages
which is the path for CPython 3.9, not PyPy.