Doing things with stuff
Archive for November, 2019
Howto copy a Python3 virtual environment to another location
01 month
If you want to copy a python3 virtual environment to another location do the following:
sudo apt install -y python3-pip build-essential \
libssl-dev libffi-dev python3-dev python3-venv
mkdir Python-Envs
cd Python-Envs
python3.6 -m venv env
Make a entry point for the various projects
cd Python-Envs
mkdir src
To activate:
cd Python-Envs
source env/bin/activate
cd src[My project]
Do your stuff
to deactivate:
deactivate
In case you want to move a virt to another machine:
In the source env do:
pip3 freeze > requirements.txt
Copy that requirements.txt file to the other virt
in the other virt do:
pip3 install -r requirements.txt
Recent Comments