简体   繁体   中英

Cannot activate virtual environment on virtual studio

I am using Visual Studio Code and have Anaconda downloaded so i selected it as my path interpreter.

I am able to download virtualenv using pip install virtualenv and then instantiate it using virtualenv env .

The issue occurs when I try to activate the environment using activate env or conda activate env .

Error message returned: Could not find conda environment: env . I then proceeded to look into my directory and I see that the environment is included as a folder so I'm confused on why I cannot activate it. For reference I am using Windows.

Edit: Originally the environment was not appearing in my users/.conda/environments file but using conda create --name venv I was able to create a new environment here. However, it doesn't instantiate in my current directory. Thoughts?

conda virtual environments are not interchangeable with virtualenv virtual environments. If you have created a virtual environment in your current dir. The ps command would be .\\Scripts\\activate

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM