Created
January 27, 2020 07:10
-
-
Save khangvan/09fa852459a412c0404b29bfad226836 to your computer and use it in GitHub Desktop.
python3_virtualenv_venv_operation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#check python version | |
python -V | |
# install | |
pip3 install virtualenv | |
# create env | |
python3 -m venv base | |
# activate | |
source base/bin/activate | |
# deativate | |
deactivate | |
#packing requirements | |
pip freeze > requirements.txt | |
#delete | |
rm -rf venv | |
# crontab | |
crontab -e | |
* * * * * /path/to/venv/bin/python /path/to/code.py | |
# new env install packing | |
pip install -r requirements.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment