简体   繁体   中英

Install Python 3.6.3 in Virtualenv using pip in WIndows 10?

How do you install Python 3.6.x in a virtualenv using pip in Windows 10?

pip install python, pip install python3, pip install python3.6 don't work.

Pip and virtualenv are two separate tools. Pip is a package manager, you will use it to install packages into your virtual environment once it has been set up. Pip does not actually manage the virtual environment. Virtualenv is the tool that handles creating virtual environments.

First, you should check if you have virtualenv installed with virtualenv --version . If you do not have it, you will get an error that virtualenv is not found. You can use pip to install virtualenv with pip install virtualenv .

Once you have virtualenv, you can create a python 3.6 environment with virtualenv -p python3.6 /path/to/myvirtualenv . You will need an installation of python 3.6 for this command to work, so download and install python 3.6 first if you do not have it.

I believe that on windows if you don't have python 3.6 in your PATH variable, you may need to point directly to the python 3.6 installation instead with virtualenv -p /path/to/mypython3.6 /path/to/myvirtualenv .

See Virtualenv User Guide

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