Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Installing PIP and setting up virtualenv
Follow this first(install Python 3.7) so pip and python work from command line(cmd), Python 3.6/3.7 and pip installation under Windows

Virtual environment in build into Python(no install) trough venv.
Here is run:
# Test python
C:\>python -c "import sys; print(sys.executable)"
# Test pip
C:\>pip -V
pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7)
# Make virtual environment 
C:\1>python -m venv test_env
# Cd in
C:\1>cd test_env
# Activate environment 
# Test python again,see now that it point to environment folder
(test_env) C:\1\test_env>python -c "import sys; print(sys.executable)"
# Test pip,see that it point to environment folder
(test_env) C:\1\test_env>pip -V
pip 19.0.3 from c:\1\test_env\lib\site-packages\pip (python 3.7)
# Will now only install to environment 
(test_env) C:\1\test_env>pip install requests
Collecting requests
Installing collected packages: urllib3, certifi, chardet, idna, requests
Successfully installed certifi-2019.3.9 chardet-3.0.4 idna-2.8 requests-2.21.0 urllib3-1.24.2
# Test that it work
(test_env) C:\1\test_env>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> exit()
(test_env) C:\1\test_env>
If using virtual environment for Editor/IDE setup to use python.exe in environment.
Eg a good Editor is VS Code from start.

Top Page

Messages In This Thread
RE: Installing PIP and setting up virtualenv - by snippsat - Aug-08-2019, 05:52 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  python -m venv VS virtualenv kazi380 4 777 Jul-17-2019, 08:51 PM
Last Post: Larz60+
  Virtualenv and an infinitely spooling interpreter? eblade 3 662 Jul-11-2019, 06:58 PM
Last Post: eblade
  Why is virtualenv not by default relocatable? bpostow 1 644 Mar-08-2019, 06:57 PM
Last Post: bpostow
  opencv without virtualenv tony1812 0 1,634 Jan-20-2018, 12:42 AM
Last Post: tony1812
  virtualenv activate.ps1 hash error po20 2 1,594 Jan-13-2018, 09:21 AM
Last Post: po20
  virtualenv on powershell mcmxl22 3 3,117 Feb-08-2017, 06:29 AM
Last Post: snippsat

Forum Jump:

Users browsing this thread: 1 Guest(s)