Opened at 2021-05-05T15:51:10Z
Last modified at 2021-05-11T19:57:00Z
#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:
- create a special directory that will hold all of your virtual environments so proceed with creating a new hidden directory called virtualenv.
mkdir .virtualenv
- Install pip for Python3.
sudo apt install python3-pip
- Confirm the pip3 installation.
pip3 -V
- Install virtualenvwrapper via pip3:
pip3 install virtualenvwrapper
- 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
- 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
- save and exit the Vim editor.
- Reload the bashrc script:
source ~/.bashrc command
- create a virtual environment in Python3 and activate it immediately:
mkvirtualenv name_of_your_env
Note: See
TracTickets for help on using
tickets.