I. Introduction
As we all know, Anaconda will install Python by default when it is installed (myself is Python 3.8.3). For reasons of use, I need to return to Python 3.6 version, so I installed python 3.6 version through conda. However, due to usage habits, I prefer to open Python 3.6 by default, so after Google, I found a solution. The entire operation process is recorded as follows:
2. Setup process
2.1 Find the python installation path of the default version
The newly installed python environment in Anaconda will be in the envs folder under the Anaconda3 directory , and then enter the corresponding python version and copy the path. For example, my own
2.2 Add user environment variables
Right-click this computer -> select properties -> select advanced system settings -> click environment variables , you can see the corresponding environment variables of Anaconda in the user environment variable Path, the next step is to add the path copied above to the Path environment variable Go, note that its location should be above the python path installed by Anaconda by default . The setting result is as follows: After
setting, open python through the command line, you can see that the python 3.6 version is now opened by default:
2.3 Set the ipython version corresponding to python to be opened by default
The ipython path corresponding to python is generally in the Scripts folder of the python installation directory . For example, my own is as follows:
2.4 Add ipython path to user environment variable
Open the path in the user environment variable and add the ipthon path. Note that it needs to be set on the ipython path that comes with Anaconda . The setting results are as follows:
After setting, open ipython through the command line, you can see that its corresponding version has become python3.6:
3. Conclusion
After the above configuration, you can modify the default python and ipython versions in the Anaconda multi-version environment. The above is the entire content of this article. If you feel good, you can like it or support the blogger. Your support is the blogger. Continue the inexhaustible power of code text! ! !