Reputation: 21
Creating virtual environment in Windows
C:\Python>mkvirtualenv py1 C:\Users\176226\Envs is not a directory, creating FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\176226\anaconda3\Lib\venv\scripts\nt\python.exe'
This path exists: c:\users\176226\anaconda3\Lib\venv\scripts\nt\ And I do have python installed as well Can someone please help
Upvotes: 0
Views: 8793
Reputation: 1478
c:\users\176226\anaconda3\Lib\venv\scripts\nt\python.exe
The above path is of Python executable not the environment source file.
Assuming that you are using Python 3, you can follow the below steps to create and activate Python environment:
To create environment: python -m venv path/to/virtualenv
Example:
python -m venv .venv
The above command creates Python environment in current directory.
To activate the environment created in the previous step:
.venv\Scripts\activate
activate
is the source script which activates the environment.
Upvotes: 3
Reputation: 589
Pls. refer https://www.geeksforgeeks.org/creating-python-virtual-environment-windows-linux/ Windows section. If python is installed in your system, then pip comes in handy.
Upvotes: 0