-
You need to install Python itself and Python environment package
-
Debian or Ubuntu (default Python is Python2):
sudo apt install python3 python3-virtualenv
-
Fedora, RHEL or CentOS (default Python is Python3):
sudo yum install python python-virtualenv
-
-
Create Python virtual environment (use command
python3
on Debian/Ubuntu) namedenv
:python -m virtualenv pyenv
-
Enable created environment
env
(you need to do it everytime you are in new bash and want to use the environment):source pyenv/bin/activate
-
Update pip:
pip install --upgrade pip
-
Install other pip packages which you need:
pip install PACKAGENAME