GIGAMIND

Folder:
121 Python
File:
121.001 Python - Python virtualenv

Python virtualenv

virtualenv is a way to logically separate the computer environment you're working inside of, so that other libraries or configurations don't interfere with the current python project.

Instal virtualenv

pip install virtualenv

Install python virtualenv with python3

I always want to use python3 these days because it is supported and some tools don't work with python2.7.

  1. virtualenv --python python3 venv
    • virtualenv = command
    • --python python3 = initialize with python3
    • venv = name of the virtualenv (can be anything, but I always use "venv")
  2. . venv/bin/activate
    • Activate the virtual environment (alternatively, could use source venv/bin/activate, but I like . b/c it is shorter)

Source:
  • Me