1

I know there are some similar questions,but it is really hard for me to finish it.

I'm trying to create a virtualenv with python 3.7.7 in windows.

I have a downloaded python 3.7.7

C:\Users\willi\AppData\Local\Programs\Python\python-3.7.8-embed-amd64

Since I can built a virtualenv using:

python3 -m venv myenv

So I tried to modify it ,so that it can match specific python version:

python3 -m C:\Users\willi\AppData\Local\Programs\Python\python-3.7.8-embed-amd64\python.exe myenv

But it failed:

ModuleNotFoundError: No module named 'C:\\Users\\willi\\AppData\\Local\\Programs\\Python\\python-3')

Any friends can teach me how to build a virtualenv with python 3.7.7?

2
  • Does this answer your question? Use different Python version with virtualenv Commented Jul 22, 2020 at 5:55
  • Usually you'd need to have python on your Environment path Variable. After that you can use python -m venv myenv or python3 -m venv myenv. I recommend downloading and installing python from microsoft store. But here is a tutorial from realpython.com/installing-python Commented Jul 22, 2020 at 6:12

1 Answer 1

1

I think you haven't installed virtual environment in your local python

pip install virtualenv

and follow your steps. Stil, find the error. Try doing below methods, I think you will get your answer-

in command prompt

pip install virtualenv

go to the location, where you want to create your environment

cd location
virtualenv project_env_name

Now, you will find a python env in the desired location, Then go to scripts

cd project_env_name/scripts
activate

You will enter the environment you created. while leaving the environment, do

deactivate

To leave the environment.

This method works if you want to create the same python version environment as python version in your machine. If you want to create an environment of the different version, you need to install the python of that version.

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

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.