Home > OS >  How to change python path in MacOS terminal
How to change python path in MacOS terminal

Time:10-18

Today I updated python to version 3.10.0, and my terminal will not use that version. I have two paths for python, and I would like to switch the default path from "/opt/miniconda3/bin/python" to "/usr/bin/python"

This is the output of the commands "which python" "which -a python" and "python --version". The 3.9.5 version is in the "/opt/miniconda3/bin/python" path, and the updated(3.10.0, installed today) version is in "/usr/bin/python" path. enter image description here

I know there are similar questions on here and other places, but I can't figure out how to apply the answers to my situation.

How can I switch the path to default to "/usr/bin/python"?

CodePudding user response:

Simply deactivate your Conda environment with

conda deactivate

Example:

(base) ➜  ~ which python
/Users/me/miniconda3/bin/python
(base) ➜  ~ conda deactivate
➜  ~ which python
/usr/bin/python
➜  ~
  • Related