Python Notes: PIP3.6 (PIP for python3.6)

  1. The information presented here is intended for educational use.
  2. The information presented here is provided free of charge, as-is, with no warranty of any kind.
  3. Edit: 2026-08-08

Introduction

Notes:

===============================================================================
title  : pip36-notes.txt
author : Neil Rieck
edit   : 2022-06-03
edit   : 2023-11-03
caveat : for safer installs use this: "python3.6 -m pip something"
notes  : do not use "-H" with sudo
stanzas:
        1) the basics
        2) local repositories (under your home folder)
        3) global repositories (under /usr/lib64/python3.6/site-packages/)
        4) problems and solutions
                problem-1 (pip3.6 installs are currently broken)
                problem-2 (can't update pip past a certain level)
                problem-3 (installing XlsxWriter from the new site)
                problem-4 (installing pysftp     from the new site)
        5) experimental packages
===============================================================================

---------------------------------------------------------------
        the basics
---------------------------------------------------------------
python3 -m pip --version                # view installed version of pip
python3 -m pip list                     # list installed packacges
python3 -m pip show   pandas            # view stuff about pandas (must be installed)
python3 -m pip search "pandas"          # currently broken so visit here:  https://pypi.org/
python3 -m pip check
    httpie 2.0.0 has requirement requests>=2.22.0, but you have requests 2.21.0.
sudo python3 -m install --upgrade requests      # which failed over to a local install
----------------------------
su -
python3 -m pip check                            # which show previous error msg
python3 -m install --upgrade requests           # which worked
python3 -m pip check                            # which now passes
exit                                            # now still need to clean my local repository

---------------------------------------------------------------
        local repositories
---------------------------------------------------------------
python3 -m pip list      --local
python3 -m pip freeze    --local > pip-freeze.txt
# quick way to delete all local python3.6 packages for user neil:
rm -fr /home/neil/.local/lib/python3.6
python3 -m pip show      p

---------------------------------------------------------------
        global repositories
---------------------------------------------------------------
sudo python3 -m pip list
sudo python3 -m pip show              pandas
sudo python3 -m pip install --upgrade pandas
sudo python3 -m pip show              pandas

---------------------------------------------------------------
        problem-01
        NOTE: the python packages site has moved somewhere else
---------------------------------------------------------------
1) pip3.6 requests packages from: pypi.python.org
2) pip3.7 requests packages from: pypi.org
3) when using pip3.6 via a proxy server, the old site will redirect to the new
   site which presents a different certificate so. So you need to include
   these switches:
a) --index  https://pypi.org/simple
b) --trusted-host   pypi.org
c) --trusted-host   files.pythonhosted.org
d) --proxy  http://fastweb.int.bell.ca:8083

caveats:
1) for some unknown reason the proxy switch is not required with 3.6 but is
required with 3.7 and higher. This supposedly has something to do with TLS
protocol differences
2) when
---------------------------------------------------------------
        problem-02
---------------------------------------------------------------
1) so lets update pip3.6

   sudo python3.6 -m pip install --upgrade pip --index https://pypi.org/ --trusted-host pypi.org
   WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
   Requirement already up-to-date: pip in /usr/lib/python3.6/site-packages

2) use a browser to visit:      https://pypi.python.org/simple/pip/
   which redirects to here:     https://pypi.org/simple/pip/
3) I download this file 'pip-22.1.tar.gz' to my pc then ftp'd it to this folder
4) then I ran this cmd:
        sudo python3.6 -m pip pip3 install /home/neil/pip-22.1.tar.gz
   response:
        WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
        Processing ./pip-22.1.tar.gz
        pip requires Python '>=3.7' but the running Python is 3.6.8     <<<<<<<<<<<<<<<<<<<<<<<<<< whoops
        You are using pip version 21.3.1, however version 22.1.2 is available.
        You should consider upgrading via the 'pip install --upgrade pip' command.
---------------------------------------------------------------
        problem-03 (need lastest XlsxWriter)
---------------------------------------------------------------
1) surf: https://pypi.org/
   download 'XlsxWriter-3.0.3.tar.gz' to your pc
   sftp it to linux

2) hack:
        sudo pip3 install /home/neil/XlsxWriter-3.0.3.tar.gz
   or:
        sudo pip3 install ~/XlsxWriter-3.0.3.tar.gz
---------------------------------------------------------------
        problem-04 (need pysftp which depends upon paramiko)

        CAVEAT: none of these commands worked in 2023
        NOTE  : python-3.6.8 was retired 2021-12-23 so perhaps
        the dependancies are out of wack
---------------------------------------------------------------
1) sudo python3.6 -m pip install paramiko       \
   --index https://pypi.org/simple              \
   --trusted-host pypi.org                      \
   --trusted-host files.pythonhosted.org        \
   --proxy http://fastweb.int.bell.ca:8083
FAILS

2) sudo python3.6 -m pip install cryptography \
   --index https://pypi.org/simple              \
   --trusted-host pypi.org                      \
   --trusted-host files.pythonhosted.org        \
   --proxy http://fastweb.int.bell.ca:8083
FAILS

3) sudo python3.6 -m pip install pysftp         \
   --index https://pypi.org/simple              \
   --trusted-host pypi.org                      \
   --trusted-host files.pythonhosted.org        \
   --proxy http://fastweb.int.bell.ca:8083

FAILS

4) sudo python3.6 -m pip install xmltodict      \
   --index https://pypi.org/simple              \
   --trusted-host pypi.org                      \
   --trusted-host files.pythonhosted.org        \
   --proxy http://fastweb.int.bell.ca:8083

========================================================
experimental stuff (2023-11-03)
========================================================
sudo python3.6 -m pip install pyramid      \
   --index https://pypi.org/simple              \
   --trusted-host pypi.org                      \
   --trusted-host files.pythonhosted.org        \
   --proxy http://fastweb.int.bell.ca:8083

sudo python3.6 -m pip install selenium      \
   --index https://pypi.org/simple              \
   --trusted-host pypi.org                      \
   --trusted-host files.pythonhosted.org        \
   --proxy http://fastweb.int.bell.ca:8083
===============================================================================


 Back to Home
 Neil Rieck
 Waterloo, Ontario, Canada.