Raspberry Pi - Upgrading to Python 3.6
$ wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz $ tar xzvf Python-3.6.9.tgz $ cd Python-3.6.9/ $ ./configure && make && sudo make install
It will take a while to complete on a Raspberry Pi 3
Installing pip
# python3 -m pip install --user --upgrade pip
Check pip version
python3 -m pip --version
Installing virtual environment package
python3 -m pip install --user virtualenv
Create a virtual environment
python3 -m venv env
Activate virtual environment
source env/bin/activate
Deactivate virtual environment
deactivate
Install requests python package
pip3 install requests
Freezing pip dependencies
pip freeze
Using a file to control dependencies create a requirements.txt file containing:
requests==2.18.4 google-auth==1.1.0
And tell pip to install all of the packages in this file using the -r flag:
pip install -r requirements.txt
Upgrading packages with pip3
pip3 install --upgrade requests