Skip to content

Instantly share code, notes, and snippets.

@RockinPaul
Last active January 19, 2022 22:49
Show Gist options
  • Save RockinPaul/bd87e005043947afbaa97913a3f409ee to your computer and use it in GitHub Desktop.
Save RockinPaul/bd87e005043947afbaa97913a3f409ee to your computer and use it in GitHub Desktop.

Virtual Environment Setup

Navigate to the directory of a Python project you want to run in virtual environment:

cd path/to/target/project

Define virtual environment:

python3 -m venv venv

Activate it:

. venv/bin/activate

Update pip:

pip3 install -U pip

Install setuptools:

pip3 install -U setuptools

More info on topic:

https://python-guide-cn.readthedocs.io/en/latest/dev/virtualenvs.html

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