#3696 reopened defect

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

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

Description (last modified by amj)

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
  1. create a virtual environment in Python3 and activate it immediately:
mkvirtualenv name_of_your_env

Change History (2)

comment:1 Changed at 2021-05-05T15:52:30Z by maylee

  • Milestone changed from undecided to Automate Release Process
  • Owner set to amj

comment:2 Changed at 2021-05-05T15:55:13Z by amj

  • Description modified (diff)
Note: See TracTickets for help on using tickets.