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

  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  : pip39-notes.txt
author : Neil Rieck
created: 2022-09-02
edit   : 2023-06-12
notes  :
1) experiments the day after I built my own copy of python 3.9
2) always needed:       --proxy http://fastweb.int.bell.ca:8083         (never use 'https' here)
3) always needed        --trusted-host pypi.org                         (no protocol here)
4) needed for install:  --trusted-host files.pythonhosted.org           (no protocol here)
5) required for pip36:  --index https://pypi.org                        (only use 'https' here)
6) never use "-H" when using sudo
7) whenever you see this message "Defaulting to user installation because normal site-packages is not writeable"
   you should consider working from root (use 'su' because 'sudo' is not good enough). CAVEAT: many self
   help sites say to never do this but it is the only way (IMHO) to install something system-wide for
   use be Bell-ATS
8) experimental libraries should be only installed in user mode (so never use su or sudo)
stanzas:
        step 1 (ensurepip)
        step 2 (pip version check)
        step 3 (pip help)
        step 4 (pip list)
        step 5 (upgrade pip)
        step 6 (install paramiko + zeep)
        step 7 (upgrade pip)                    2023-04-18 +
        step 8 (upgrade paramiko)               2023-04-18 +
        step 9 (upgrade pysftp)                 2023-04-18 +--- for my sftp trials to SAP-p11
        step 10 (install pysftp-extension)      2023-05-04 +    note: downgrades paramiko
================================================================================================

--------------------------------------------------------------------- step 1
[neil@kawc4m ~]$ python3.9 -m ensurepip --upgrade
Defaulting to user installation because normal site-packages is not writeable
Looking in links: /tmp/tmpvgcybxno
Requirement already satisfied: setuptools in /usr/lib/python3.9/site-packages (56.0.0)
Requirement already satisfied: pip in /usr/lib/python3.9/site-packages (22.0.4)
---------------------------------------------------------------------

--------------------------------------------------------------------- step 2
[neil@kawc4m ~]$ python3.9 -m pip --version
pip 22.0.4 from /usr/lib/python3.9/site-packages/pip
---------------------------------------------------------------------

--------------------------------------------------------------------- step 3
[neil@kawc4m ~]$ python3.9 -m pip --help

Usage:
  /usr/bin/python3.9 -m pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  cache                       Inspect and manage pip's wheel cache.
  index                       Inspect information available from package indexes.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --debug                     Let unhandled exceptions propagate outside the main subroutine, instead of logging them to stderr.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  --require-virtualenv        Allow pip to only run in a virtual environment; exit with an error otherwise.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING,
                              ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --no-input                  Disable prompting for input.
  --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS.
  --cert <path>               Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL Certificate
                              Verification' in pip documentation for more information.
  --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the certificate in PEM
                              format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for download.
                              Implied with --no-index.
  --no-color                  Suppress colored output.
  --no-python-version-warning
                              Silence deprecation warnings for upcoming unsupported Pythons.
  --use-feature <feature>     Enable new functionality, that may be backward incompatible.
  --use-deprecated <feature>  Enable deprecated functionality, that will be removed in the future.
[neil@kawc4m ~]$
---------------------------------------------------------------------

--------------------------------------------------------------------- step 4
python3.9 -m pip list                                           (not a clean ressponse)
python3.9 -m pip list                   --trusted-host pypi.org (clean response)
---------------------------------------------------------------------

--------------------------------------------------------------------- step 5
python3.9 -m pip install --upgrade pip  --trusted-host pypi.org
Defaulting to user installation because normal site-packages is not writeable (sudo not good enough, first su to root)
Requirement already satisfied: pip in /usr/lib/python3.9/site-packages (22.0.4)
-----------------------------
su
python3.9 -m pip install --upgrade pip  --trusted-host pypi.org
---------------------------------------------------------------------

--------------------------------------------------------------------- step 6
$ su
# python3.9 -m pip install paramiko             \
 --trusted-host pypi.org                        \
 --trusted-host files.pythonhosted.org          \
 --proxy http://fastweb.int.bell.ca:8083

# python3.9 -m pip install pysftp               \
 --trusted-host pypi.org                        \
 --trusted-host files.pythonhosted.org          \
 --proxy http://fastweb.int.bell.ca:8083

# python3.9 -m pip install zeep                 \
 --trusted-host pypi.org                        \
 --trusted-host files.pythonhosted.org          \
 --proxy http://fastweb.int.bell.ca:8083

# python3.9 -m pip install xmltodict            \
 --trusted-host pypi.org                        \
 --trusted-host files.pythonhosted.org          \
 --proxy http://fastweb.int.bell.ca:8083

===================================================================== step 7
$ su
# python3.9 -m pip install --upgrade pip  --trusted-host pypi.org
Requirement already satisfied: pip in /usr/lib/python3.9/site-packages (22.2.2)
Collecting pip
  Downloading pip-23.1-py3-none-any.whl (2.1 MB)
     qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq 2.1/2.1 MB 7.7 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.2.2
    Uninstalling pip-22.2.2:
      Successfully uninstalled pip-22.2.2
Successfully installed pip-23.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager.
It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#
===================================================================== step 8
$ su
# python3.9 -m pip install --upgrade paramiko --trusted-host pypi.org
Requirement already satisfied: paramiko in /usr/lib/python3.9/site-packages (2.11.0)
Collecting paramiko
  Downloading paramiko-3.1.0-py3-none-any.whl (211 kB)
     qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq 211.2/211.2 kB 3.0 MB/s eta 0:00:00
Requirement already satisfied: bcrypt>=3.2 in /usr/lib/python3.9/site-packages (from paramiko) (4.0.0)
Requirement already satisfied: cryptography>=3.3 in /usr/lib/python3.9/site-packages (from paramiko) (38.0.1)
Requirement already satisfied: pynacl>=1.5 in /usr/lib/python3.9/site-packages (from paramiko) (1.5.0)
Requirement already satisfied: cffi>=1.12 in /usr/lib/python3.9/site-packages (from cryptography>=3.3->paramiko) (1.15.1)
Requirement already satisfied: pycparser in /usr/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.3->paramiko) (2.21)
Installing collected packages: paramiko
  Attempting uninstall: paramiko
    Found existing installation: paramiko 2.11.0
    Uninstalling paramiko-2.11.0:
      Successfully uninstalled paramiko-2.11.0
Successfully installed paramiko-3.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager.
It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#
===================================================================== step 9
$ su
# python3.9 -m pip install --upgrade pysftp --trusted-host pypi.org
Requirement already satisfied: pysftp in /usr/lib/python3.9/site-packages (0.2.9)
Requirement already satisfied: paramiko>=1.17 in /usr/lib/python3.9/site-packages (from pysftp) (3.1.0)
Requirement already satisfied: bcrypt>=3.2 in /usr/lib/python3.9/site-packages (from paramiko>=1.17->pysftp) (4.0.0)
Requirement already satisfied: cryptography>=3.3 in /usr/lib/python3.9/site-packages (from paramiko>=1.17->pysftp) (38.0.1)
Requirement already satisfied: pynacl>=1.5 in /usr/lib/python3.9/site-packages (from paramiko>=1.17->pysftp) (1.5.0)
Requirement already satisfied: cffi>=1.12 in /usr/lib/python3.9/site-packages (from cryptography>=3.3->paramiko>=1.17->pysftp) (1.15
.1)
Requirement already satisfied: pycparser in /usr/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.3->paramiko>=1.17->py
sftp) (2.21)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager.
It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[root@kawc4n neil]#
===================================================================== step 10
$ su
# python3.9 -m pip install pysftp-extension --trusted-host pypi.org
Collecting pysftp-extension
  Downloading pysftp_extension-0.2.13-py3-none-any.whl (14 kB)
Collecting paramiko==2.9.2 (from pysftp-extension)
  Downloading paramiko-2.9.2-py2.py3-none-any.whl (210 kB)
     qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq 210.5/210.5 kB 2.0 MB/s eta 0:00:00
Requirement already satisfied: bcrypt>=3.1.3 in /usr/lib/python3.9/site-packages (from paramiko==2.9.2->pysftp-extension) (4.0.1)
Requirement already satisfied: cryptography>=2.5 in /usr/lib/python3.9/site-packages (from paramiko==2.9.2->pysftp-extension) (40.0)
Requirement already satisfied: pynacl>=1.0.1 in /usr/lib/python3.9/site-packages (from paramiko==2.9.2->pysftp-extension) (1.5.0)
Requirement already satisfied: cffi>=1.12 in /usr/lib/python3.9/site-packages (from cryptography>=2.5->paramiko==2.9.2->pysftp-exte)
Requirement already satisfied: pycparser in /usr/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=2.5->paramiko==2.9.2->)
Installing collected packages: paramiko, pysftp-extension
  Attempting uninstall: paramiko
    Found existing installation: paramiko 3.1.0
    Uninstalling paramiko-3.1.0:
      Successfully uninstalled paramiko-3.1.0
Successfully installed paramiko-2.9.2 pysftp-extension-0.2.13
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager.v

[notice] A new release of pip is available: 23.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
#
===================================================================== this is the end


 Back to Home
 Neil Rieck
 Waterloo, Ontario, Canada.