1. Problem description: In one of the environment directories of anaconda's envs, there is no python.exe file, only conda-meta and scripts
Usually create a virtual environment is:
conda create -n test #test为创建的虚拟环境名称
Because it has been created several times before, and there is no error reported in the command line, so I am going to add the newly configured test virtual environment to the pycharm interpreter, but I find that there is no conda-meta in the test environment . For any other files, use the following figure to compare the difference between the normal virtual environment and the test virtual environment, as shown in the figure below
2. Solution:
The anaconda virtual environment still uses the python/pip of the base environment
At that time, when creating a new xxxx virtual environment, I did not specify the python version, directly conda create -n xxxxx, and after activation, I saw that python is the default version of python of this anaconda. The folder cannot be activated normally, and the base environment is still used (although a (xxxxx) is marked in front)
Delete the problematic virtual environment: (executed in the base environment)
conda remove -n xxxx --all
Create a new virtual environment and specify the python version when creating a new one
conda create -n test python=3.8 #test为创建的虚拟环境名称
That's it.