Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 638
CodeMan Avatar asked Oct 22 '17 00:10

CodeMan


People also ask

How to install Pip and virtualenv on Windows?

Pip and virtualenv on Windows 1 Install pip. Pip (Python Package Installer), official documentation for pip. Usually Python3 comes with pip preinstalled. 2 virtualenv. 3 Launch virtualenv. 4 Another way to install pip. More ...

How to install virtualenv to manage Python packages on Windows?

To upgrade PIP on Windows, enter the following in the command prompt: To downgrade PIP, enter: python -m pip install pip==20.0.1 Now that you have PIP up and running, you are ready to install VirtualEnv and manage Python packages. Step 3. Install VirtualEnv & Activate virtualenv is used to manage Python packages for different projects.

How to use Python 3 virtual environment in Windows 10?

Since Python is available on Windows 10, you can also use virtual environments on Windows 10. Typically, using a Python 3 virtual environment in Windows 10 involves the following steps: Installing Python 3 with pip and several features. Creating a Python 3 virtual environment with Python 3 venv module. Activating the Python 3 virtual environment.

How to install Pip in Python 3?

Pip (Python Package Installer), official documentation for pip. Usually Python3 comes with pip preinstalled. If you get an error "pip command not found", use the following command to install pip: Download get-pip.py, make sure you're saving file to Desktop


Video Answer


1 Answers

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

like image 69
Steven Walton Avatar answered Oct 21 '22 05:10

Steven Walton