At first we need to update the packages.
user@tokyo:~$ sudo apt-get update
To then install python3-pip.
user@tokyo:~$ sudo apt-get -y install python3-pip
And with pip3 install virtualenv.
user@tokyo:~$ pip3 install virtualenv
Now a virtual environment can be created.
user@tokyo:~$ python3 -m virtualenv venv
To activate the virtual environment just enter the following command.
user@tokyo:~$ source venv/bin/activate
To deactivate the virtual environment just enter the following command.
(venv) user@tokyo:~$ deactivate
One response to “How to create, activate and deactivate a virtualenv for Python 3.7.3 on Ubuntu 20.04”
Great note Jürgen, simple and practical.
The steps you posted works for me very well.