I entered activate in vscode and couldn't activate the virtual environment I wanted to use, then installed a library according to the blogger's method, reconfigured it, and it succeeded. Therefore, this article summarizes from the blogger: The conda virtual environment cannot be activated in vscode_Youtiao's blog-CSDN blog_vscode activates the virtual environment
Thanks blogger
step1: Run the following command on the vscode terminal to install the library
# 安装库
conda install -n root -c pscondaenvs pscondaenvs
step2:# Change Windows PowerShell configuration
Start PowerShell as administrator
And enter the following command in PowerShell:
Set-ExecutionPolicy RemoteSigned
Step3: Go back to vscode and restart it, then enter activate your virtual environment name, and you can create a virtual environment in conda. For example: