1

I downloaded Python 3.7, and then I deleted and changed Python 3.7 to 2.7 (using bash_profile, I changed the content in bash profile, just like the image below), and it worked.

enter image description here

But I found that Python 2.7 is too old. So I want to change Python 2.7 to 3.5, so that the version can match with my book. So I am trying to use the way above, but it didn't work.

enter image description here

Glorfindel
  • 4,057
gefei li
  • 11
  • 1

1 Answers1

1

You can't change python 2.7 to 3.5 or anything like that. It sounds like you want to use a certain version and you have two versions loaded. You should set up virtual environments and define one for each version of python you have installed. Then you can activate whichever version you want to use. There are instructions all over the internet on how to define and build virtual environments. A few are here and here. Find one you like. If you're using the Anaconda distribution of python this is all made easy and is well documeted on the Anaconda web page. Other methods are pretty simple as well.

Natsfan
  • 14,185