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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply