09 May 2024

How to create a virtual environment with preinstalled packages as in requirements.txt

https://stackoverflow.com/questions/41427500/creating-a-virtualenv-with-preinstalled-packages-as-in-requirements-txt

$ git clone <repo>

$ cd <repo>

$ sudo apt install python3-venv (if you don't already have virtualenv installed)

$ python3 -m venv venv/ to create your new environment (called 'venv/' here)

$ source venv/bin/activate to enter the virtual environment

$ pip install -r requirements.txt to install the requirements in the current environment

No comments:

Post a Comment