Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 1.16 KB

install-python.md

File metadata and controls

61 lines (46 loc) · 1.16 KB

Installing Python libraries

Python

Install dependencies

sudo apt-get install --no-install-recommends python3-pip
# Upgrade Pip
sudo pip3 install --upgrade pip

Install Python libraries

# Basic libraries
sudo pip3 install \
    progressbar2 \
    requests \
    Cython \
    pylint \
    autopep8 \
    pytest \
    pydocstyle

Make use of virtual environments

If you aren't familiar with virtual environments, check out this article on RealPython.

Install virtualenv and virtualenvwrapper:

sudo pip3 install \
    virtualenv \
    virtualenvwrapper

To finish, we need to update the ~/.profile file (similar to .bashrc or .bash_profile).

Copy and paste the following commands:

read -r -d '' PROFILE <<"EOF"
# virtualenv and virtualenvwrapper
export WORKON_HOME=${HOME}/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /usr/local/bin/virtualenvwrapper.sh
EOF

# Create the ~/.profile file
echo "${PROFILE}" >> ${HOME}/.profile
# Update the terminal
source ${HOME}/.profile