Skip to content

Instantly share code, notes, and snippets.

@llipe
Last active July 10, 2020 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llipe/0ccdf719e2ba9fc79f5c0b3aa1c82c5b to your computer and use it in GitHub Desktop.
Save llipe/0ccdf719e2ba9fc79f5c0b3aa1c82c5b to your computer and use it in GitHub Desktop.

Python3 Virtualenv Setup

Based on: https://gist.github.com/pandafulmanda/730a9355e088a9970b18275cb9eadef3

Requirements

  • Python 3
  • Pip 3
$ brew install python3

Pip3 is installed with Python3

Installation

To install virtualenv via pip run:

$ pip3 install virtualenv

Usage

Creation of virtualenv:

$ virtualenv -p python3 <desired-path>
# Example. venv is a common naming for this
$ virtualenv -p python3 venv

Activate the virtualenv:

$ source <desired-path>/bin/activate

Deactivate the virtualenv:

$ deactivate

Closing notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment