#3696 reopened defect

Fix for Ubuntu 20.4 bug on Python-virtualenv — at Initial Version

Reported by: amj Owned by:
Priority: major Milestone: Automate Release Process
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

fixing "python-virtualenv has no installation candidate" Solution:

  1. create a special directory that will hold all of your virtual environments so proceed with creating a new hidden directory called virtualenv.
mkdir .virtualenv
  1. Install pip for Python3.
sudo apt install python3-pip
  1. Confirm the pip3 installation.
pip3 -V
  1. Install virtualenvwrapper via pip3:
pip3 install virtualenvwrapper
  1. Modify your .bashrc file by adding a row that will adjust every new virtual environment to use Python 3. We will point virtual environments to the directory we created above (.virtualenv) and we will also point to the locations of the virtualenv and virtualenvwrapper.

Now open the .bashrc file using any editor(we use Vim).

vim .bashrc
  1. Navigate to the bottom of the .bashrc file, press the letter i to enter the insert mode of Vim and add these rows:
#Virtualenvwrapper settings:
export WORKON_HOME=$HOME/.virtualenvs
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
. /usr/local/bin/virtualenvwrapper.sh
  1. save and exit the Vim editor.
  2. Reload the bashrc script:
source ~/.bashrc command
  1. create a virtual environment in Python3 and activate it immediately:
mkvirtualenv name_of_your_env

Change History (0)

Note: See TracTickets for help on using tickets.