# Step 1: Need root permission.
sudo bash
# Step 2: Update your repositories
apt update -y
# Step 3: Install pip for Python 3
apt install python3-pip
# Step 4: Use pip to install VirtualEnv
pip3 install virtualenv
# Step 5: Create a Virtual Environment of Python 3, the virtual env name is "myEnv".
virtualenv -p python3 myEnv
# Step 6: Activate a new Python 3 virtual env.
# or "source env3/bin/activate"
. myEnv/bin/activate
# Step 7-1: You can make sure you are now working with Python 3.
python --version
# Step 7-2: You can make sure the Python 3's Path.
which python
# Step 8: Leave the virtual env.
deactivate