Changes between Version 2 and Version 5 of Ticket #3696


Ignore:
Timestamp:
2021-05-06T12:47:40Z (9 months ago)
Author:
amj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3696

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #3696 – Description

    v2 v5  
    22Solution:
    33
    4 1. create a special directory that will hold all of your virtual environments so proceed with creating a new hidden directory called '''virtualenv.'''
    5 
     4Use
    65{{{
    7 mkdir .virtualenv
     6apt install virtualenv
    87}}}
    9 
    10 2. Install pip for Python3.
    11 
    12 {{{
    13 sudo apt install python3-pip
    14 }}}
    15 
    16 3. Confirm the pip3 installation.
    17 
    18 {{{
    19 pip3 -V
    20 }}}
    21 
    22 
    23 4. Install virtualenvwrapper via pip3:
    24 
    25 {{{
    26 pip3 install virtualenvwrapper
    27 }}}
    28 
    29 
    30 5. 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.
    31 Now open the .bashrc file using any editor(we use Vim).
    32 
    33 {{{
    34 vim .bashrc
    35 }}}
    36 
    37 6. Navigate to the bottom of the .bashrc file, press the letter i to enter the insert mode of Vim and add these rows:
    38 
    39 {{{
    40 #Virtualenvwrapper settings:
    41 export WORKON_HOME=$HOME/.virtualenvs
    42 VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
    43 . /usr/local/bin/virtualenvwrapper.sh
    44 }}}
    45 
    46 5. save and exit the Vim editor.
    47 6. Reload the bashrc script:
    48 
    49 {{{
    50 source ~/.bashrc
    51 }}}
    52 
    53 7. create a virtual environment in Python3 and activate it immediately:
    54 
    55 {{{
    56 mkvirtualenv name_of_your_env
    57 }}}
    58