Would you like to learn how to install the Python virtual environment on Ubuntu Linux? In this tutorial, we are going to show you all the steps required to install the virtual environment of Python on Ubuntu Linux.
• Ubuntu 18.04
• Ubuntu 19.10
• Ubuntu 20.04
• Python 3
• Python 2
Ubuntu Playlist:
On this page, we offer quick access to a list of videos related to Ubuntu Linux.
Don’t forget to subscribe to our youtube channel named FKIT.
Ubuntu Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Ubuntu linux.
Tutorial Ubuntu – Installing the Python 3 virtual environment
Install the required packages.
Create a directory to store the Python virtual environment projects.
Create a Python virtual environment.
Verify the content of the virtual environment directory.
Here is the command output.
Start using the Python 3 virtual environment.
The command line prompt should change.
Verify the Python version being used in the virtual environment.
Here is the command output.
Verify the absolute path to the Python command.
Here is the command output.
Verify the PIP version being used in the virtual environment.
Here is the command output.
Install the desired libraries in the Python virtual environment.
In our example, we used the PIP command to install the ART library.
Start a Python prompt within the virtual environment.
Test the Python library installed.
Here is the command output.
Stop the Python virtual environment.
Keep in mind that Python libraries installed inside the virtual environment were not installed outside the virtual environment.
Congratulations! You have finished the Python virtual environment installation on Ubuntu Linux.
Tutorial Ubuntu – Installing the Python 2 virtual environment
Install the required packages.
Install the PIP package for Python 2.
Install the VIRTUALENV package for Python 2.
Create a directory to store the Python virtual environment projects.
Create a Python virtual environment.
Verify the content of the virtual environment directory.
Here is the command output.
Start using the Python 2 virtual environment.
The command line prompt should change.
Verify the Python version being used in the virtual environment.
Here is the command output.
Verify the absolute path to the Python command.
Here is the command output.
Verify the PIP version being used in the virtual environment.
Here is the command output.
Install the desired libraries in the Python virtual environment.
In our example, we used the PIP command to install the ART library.
Start a Python 2 prompt within the virtual environment.
Test the Python library installed.
Here is the command output.
Stop the Python 2 virtual environment.
Keep in mind that Python libraries installed inside the virtual environment were not installed outside the virtual environment.
Congratulations! You have finished the Python 2 virtual environment installation on Ubuntu Linux.