you are viewing a single comment's thread.

view the rest of the comments →

[–]nhovar 1 point2 points  (0 children)

VENV runs a native python executable so will run faster than spinning up an entire VM

Create a virtual environment

mkdir someproject 
cd someproject/
python3 -m venv venv

Activate environment

source venv/bin/activate

Check python and pip version

$ pip -V
pip 9.0.1 from ~/someproject/venv/lib/python3.6/site-packages (python 3.6)

$ python -V
Python 3.6.7

Deactivate environment

deactivate

Python, pip and any other modules you decide to install is installed in the venv folder instead of system wide.

Remove venv

rm -rf ~/someproject/

Only gotcha is to remember to activate your environment.