0

MacBook Pro already had one python 3.8.2 installation. Then I installed anaconda which has python 3.8.5 and installed python 3.9.4 from python.org.

Pip3 is installing packages to anaconda, not for 3.9.4. How to install packages for python 3.9.4 using pip3 from the terminal? Also, how to run python 3.8.2, 3.8.5, 3.9.4 separately from the terminal (along with their respective idle)?

I am not familiar with changing paths, so detailed commands will be very helpful.

(base) ~ % where python3
/Users/user/opt/anaconda3/bin/python3
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3
/usr/local/bin/python3
/usr/bin/python3
(base) ~ % where pip3
/Users/user/opt/anaconda3/bin/pip3
/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3
/usr/local/bin/pip3
/usr/bin/pip3
(base) ~ % where python
/Users/user/opt/anaconda3/bin/python
/usr/bin/python
(base) ~ % where pip
/Users/user/opt/anaconda3/bin/pip

1 Answer 1

1

Don't use pip3. Use pip3.8 or pip3.9 or start pip with an explicit python.

pythonx-m pip install package

where pythonx is python3.9 or python3.8. I suspect that python3.8 still starts 3.8.2, but to be sure, just enter python3.8 on the command line and look at startup line. I don't know anything about starting Anaconda python.

Similarly, python3.x -m idlelib` will start IDLE with whatever python3.x starts.

Sign up to request clarification or add additional context in comments.

2 Comments

Any way to use the native Python 3.8.2? Python3.8 opens the Python3.8.5 installed using anaconda.
On Windows, py -3.8 should open only python.org installs, but I cannot answer for using Terminal on Mac. If you can find the 3.8.2 folder in Finder, it should contain the 3.8.2 binary, but that does not get you pip, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.