How to Create a Python Virtual Environment on Ubuntu



How to Create a Python Virtual Environment on Ubuntu

How to Create a Python Virtual Environment on Ubuntu

Avoid dependency conflicts and segregate your Python projects by creating isolated virtual environments on Ubuntu.

Commands:
sudo apt install python3-venv
python3 -m venv ~/cool_python_apps
~/cool_python_apps/bin/pip3 install castero
source .bashrc
export PATH=~/cool_python_apps/bin:$PATH
pip3 install package_name

Chapters:
0:00 Intro
0:23 How to Create a Python Virtual Environment on Ubuntu
1:20 Use Pip the Old Way on Ubuntu
2:14 End screen

What you will learn:
1. How to Create a Python Virtual Environment on Ubuntu
a. How to install the python3-env package
b. How to use python3-venv to create virtual environments
c. How to create a directory called “cool_python_apps” in your home directory, containing everything you need to install any Python package
d. How To install any Python app
e. How to use a specific binary from within the virtual environment
f. How to install the excellent Castero terminal podcast app
g. How to placed the binray in the bin subdirectory of the virtual environment
2. Use Pip the Old Way on Ubuntu
a. How to create a new virtual environment for all your Python and Pip packages
b. How to Create an alias for the pip3 command
c. How to add the new bin directory to your path

Song: Ikson – October Sun (Vlog No Copyright Music)
Music promoted by Vlog No Copyright Music.
Video Link: https://www.youtube.com/watch?v=_5Dh36CxDoM&t=0s

#computerEverywhere