Ubuntu uses anaconda to create a new python environment

Author: cyl

Date: 2020.10.26

ubuntu18.04 (do not know if linux and windows will be different)

Note: Before using python, there is no need to switch between different versions of python. Now because the library is obsolete, you occasionally need to switch between python3.3, 2.7, and 3.6. So use anaconda to create different python environments (the storm is crying, the situation is forced )

1. Conda create -n py3.3 python=3.3
Description: conda create -n does not care that py3.3 is the name of your separate environment (because you can download many different versions at the same time, this name is used to distinguish) python =3.3 is to specify the python version you want to download

Just wait for the download to complete, but if you want to change the currently used python to the newly downloaded environment, you need the following steps.
2. Open PyCharm and
watch the lower right corner. You can see that the version is python3.6 (cyl). In fact, this cyl is what I use The name of python3.6 that anaconda downloaded before is now I want to switch to python3.3 (py3.3)
Insert picture description here3. FIle->Setting->python interpreter in the upper right corner (the Setting you opened here may not be exactly the same as mine, but they are all Find the interpreter)
Insert picture description here4. See that there is a lower triangle in the upper right corner and click show all
Insert picture description here5. You can see that I have two python3.6 here, one is base and the other is cyl (actually one is 3.6.6 and the other is 3.6.10) Why isn’t the 3.3 we just downloaded? It’s because it hasn’t been added yet.
Insert picture description here6. Click on the + on the right side of the page. Then enter the page
Insert picture description here
7. Then select conda environment
Insert picture description here
8 in the upper left corner , and then select the existing environment on the right. 3.3 OK

Then I was surprised to find that the anaconda I downloaded does not support python3.3. I vomited but the previous steps are correct

If you have solved your problem, you can save it for the next time you install a new environment! ! !

Guess you like

Origin blog.csdn.net/cyl_csdn_1/article/details/109296831