0

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

1
  • Thanks. I was able to create virtual env using command: pip install pipenv Commented Dec 4, 2020 at 6:49

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.