Skip to content

Instantly share code, notes, and snippets.

@nhthai2005
Created April 10, 2022 03:30
Show Gist options
  • Save nhthai2005/cf323aa1b704142168557fb88956c844 to your computer and use it in GitHub Desktop.
Save nhthai2005/cf323aa1b704142168557fb88956c844 to your computer and use it in GitHub Desktop.
Howto create virtual environment for Python project
#!/bin/bash
python3 -m venv <your-python-project>
# if Debian/Ubuntu, then:
# sudo apt install python3.10-venv
# python3.10 -m venv <your-python-project>
# To access your project
source /path-to-your-python-project/bin/activate
# To exit your project
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment