Page 1 of 1

I have a Python question about version and Interpreter. I use MacBook. When I open the terminal and type "python3 -v", t

Posted: Sun May 15, 2022 11:43 am
by answerhappygod
I have a Python question about version and Interpreter.
I use MacBook. When I open the terminal and type "python3 -v",
the version of python is 3.9.10
But my IDLE is 3.10.04.
My Python code contains "from PIL import Image", which means I
need to upload Pillow by "pip3 install Pillow"
So I opened the terminal and typed that pip3 command. The screen
told me "Requirement already satisfied in
/opt/homebrew/lib/python3.9/site-package (9.1.0)
That means the pillow has been install in Python 3.9.
But when I open the IDLE and type "from PIL import Image", the
screen still told me "No module named "PIL".
I guess the problem is that the Python interpreter only servers
on Python 3.9. The Python IDLE 3.10 cannot get the support by
interpreter.
Could you please teach me How can fix this issue? Thank you