1

currently, my default python version is 3.8, but my company want me to use python2.7. So, I need to change the default version of python to 2.7. But when I was searching about changing default version of python, most of the results were about change from python2.7 to python3. Is there anyone know how to change the version of python from 3.8 to 2.7? For more information: when I run which python, it returns/Users/taesankim/opt/anaconda3/bin/python And when I run which python2.7, it returns /usr/bin/python2.7

Please let me know if I missed something or I need to add more information.

Thank you.

1
  • python 2 is no longer supported, you're company needs to upgrade ;) Commented Jan 29, 2021 at 20:30

1 Answer 1

1

You could create a symbolic link to /usr/bin/python2.7 with

ln -s /usr/bin/python2.7 /usr/bin/python

Then confirm which now refers to new link.

You might have to start a new console before confirming with which.

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

2 Comments

Hi, thank you for your answer, but when I run that command, it shows me: ln: /usr/bin/python: Operation not permitted did I do something wrong?\
Oh, you likely need sudo ln -s /usr/bin/python2.7 /usr/bin/python in order to give correct permission to generate file. (and enter credentials as needed) If /usr/bin/python already exists, then this won't work.

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.