Pip3 in FreePBX v16?

I have been trying to play around with creating certificate files for provisioning Cisco phones using usecallmanager.nz’s certutils utility. The utility requires pip3 as well as the ‘cryptography’ and ‘lxml’ modules installed with pip3 commands.

Is there a way to install and run pip3 and pip3 commands on a fresh install of FreePBX v16? Or did support for pip3 get removed with change going from FreePBX v15 to v16?

Please forgive, my experience with Python/programming in general is very limited, but I feel like the issue may have something to do with not being able to install epel-release on the newer builds of FreePBX and the Sangoma Linux OS.

Something to keep in mind. Chan_SIP is deprecated and slated for removal in Asterisk v21. There is no longer really support for it. Since this hasn’t been updated to support Chan_PJSIP when Asterisk v20 is released this year it will be the last release to support this.

Thanks for the heads-up, I am actually looking into using the chan-sccp with these Cisco phones, which should remove the dependency on the SIP firmware altogether. All the rest of our extensions are using PJSIP instead of the standard SIP now.

It would be nice though to generate these certificate files within the same FreePBX installation instead of on a separate system, for both SIP or SCCP platforms.

the python interpreter for any environment will be

ls -l $(which python)

and confirmed which of by

ls -l /usr/bin/python* 
python -V

which might not be the same for your asterisk user and your login shell.

python3 is not backwards compatible with python2 , wherever you use python, be explicit as to your interpreter or expect ‘bad things to happen’

1 Like

It appears that the latest FreePBX installation is running Python version 2.7.5 based on the output below:

[root@freepbx ~]# ls -l $(which python)
lrwxrwxrwx. 1 root root 7 Mar 30 22:45 /usr/bin/python -> python2
[root@freepbx ~]# python -V
Python 2.7.5
[root@freepbx ~]#

With that said, is it safe to assume that you cannot install two different Python versions installed on a FreePBX installation?

And, since Python3 is not backwards compatible with Python2, is it also safe to assume that I can’t use pip in place of pip3?

This is looking more like I need to spin-up a Linux vm to do this kind of thing, or somehow get it to run with my current Python installation in Windows to generate these files.

No, You can have as many versions of python as you want.

The symlinks can be changed to suit but if you have both

ls -l /usr/bin/py*
ls -l $(which python)
ls -l $(which python2)
ls -l $(which python3)
cat $(which pip)
cat $(which pip2) 
cat $(which pip3)

if scripting specifically use the shebang appropriate to the scripts needs, e.g.

#!/usr/bin/env python3.9

and/or preferably use ‘virtual environments’

Ahh, well running ls -l /usr/bin/py* shows me that I may have python3.6 installed in addition:

[root@freepbx ~]# ls -l /usr/bin/py*
-rwxr-xr-x. 1 root root    78 Apr  2  2020 /usr/bin/pydoc
-rwxr-xr-x. 1 root root    78 Dec  5  2018 /usr/bin/pydoc3.6
lrwxrwxrwx. 1 root root     7 Mar 30 22:45 /usr/bin/python -> python2
lrwxrwxrwx. 1 root root     9 Mar 30 22:45 /usr/bin/python2 -> python2.7
-rwxr-xr-x. 1 root root  7144 Apr  2  2020 /usr/bin/python2.7
-rwxr-xr-x. 2 root root 11376 Dec  5  2018 /usr/bin/python3.6
-rwxr-xr-x. 2 root root 11376 Dec  5  2018 /usr/bin/python3.6m
-rwxr-xr-x. 1 root root   435 Dec  5  2018 /usr/bin/pyvenv-3.6
[root@freepbx ~]#

Just for the Hell of it I tried creating a certificate to sign ITLFile.tlv with the following command:

./mkcert --common "SAST" --organization "SAST" --unit "SAST" --years 20 /etc/ssl/private/sast.pem

And it gave an error pointing back to script itself at line 240:

./mkcert: line 240: /etc/ssl/private/sast.pem: No such file or directory
New certificate and private-key saved in /etc/ssl/private/sast.pem

I’m not sure if I need to create these directories first, or if FreePBX stores certificates some place else, or if that is just the path with the script ‘likes’ to place the generated certificates.

Also, at the top of the script it is using #!/bin/bash, changing this to #!/usr/bin/env python3.6 causes the console hang, but still respond; so I don’t think that was the ticket. This may stem from not having pip3 installed, after running cat $(which pip3) it doesn’t see one installed:

[root@freepbx certutils]# cat $(which pip3)
/usr/bin/which: no pip3 in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

I tried installing pip3 via yum but I am getting numerous errors:

[root@freepbx certutils]# yum install python3-pip
---truncated---

  file /usr/lib64/python3.6/wsgiref/__pycache__/validate.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/wsgiref/__pycache__/validate.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/wsgiref/__pycache__/validate.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/NodeFilter.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/NodeFilter.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/NodeFilter.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/domreg.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/domreg.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/domreg.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/expatbuilder.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/expatbuilder.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/expatbuilder.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/minicompat.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/minicompat.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/minicompat.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/minidom.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/minidom.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/minidom.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/pulldom.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/pulldom.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/pulldom.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/xmlbuilder.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/xmlbuilder.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/__pycache__/xmlbuilder.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/domreg.py from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/dom/minidom.py from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementInclude.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementInclude.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementInclude.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementPath.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementPath.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementPath.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementTree.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementTree.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/ElementTree.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/cElementTree.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/cElementTree.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/etree/__pycache__/cElementTree.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/parsers/__pycache__/expat.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/parsers/__pycache__/expat.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/parsers/__pycache__/expat.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/_exceptions.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/_exceptions.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/_exceptions.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/expatreader.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/expatreader.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/expatreader.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/handler.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/handler.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/handler.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/saxutils.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/saxutils.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/saxutils.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/xmlreader.cpython-36.opt-1.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/xmlreader.cpython-36.opt-2.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/xml/sax/__pycache__/xmlreader.cpython-36.pyc from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/lib64/python3.6/zipfile.py from install of python3-libs-3.6.8-13.el7.x86_64 conflicts with file from package python36u-libs-3.6.7-1.ius.centos7.x86_64
  file /usr/bin/python3.6m from install of python3-3.6.8-13.el7.x86_64 conflicts with file from package python36u-3.6.7-1.ius.centos7.x86_64
  file /usr/bin/python3.6 from install of python3-3.6.8-13.el7.x86_64 conflicts with file from package python36u-3.6.7-1.ius.centos7.x86_64

I realize that this may be out of scope of the FreePBX project, so I do apologize in advance. Since I’m not very experienced with Python/Pip/Linux-in-general, would I have better luck contacting the original creator (Gareth) of these scripts? That’s if I can contact them in the first place.

I do appreciate all the help that I am receiving by the community here immensely!

python3 -m pip install --upgrade pip
[root@freepbx certutils]# python3 -m pip install --upgrade pip
-bash: python3: command not found

I also tried the exact python version as well:

[root@freepbx certutils]# python3.6 -m pip install --upgrade pip
/usr/bin/python3.6: No module named pip
ln -s /usr/bin/python3.6 /usr/bin/python3

I just tried the above on another vm of v16 I had (thinking I may have hosed the one I’m currently working with) and it still doesn’t see pip or pip3:

[root@freepbx ~]# ln -s /usr/bin/python3.6 /usr/bin/python3
[root@freepbx ~]# python3 -m pip install --upgrade pip
/usr/bin/python3: No module named pip
[root@freepbx ~]#

What would be the command to install pip3 on the command line? Or is there something else I’m missing?

apt/yum install python3-pip

(not so sure about yum though, you might need to search)

According to all three sites:
Automate the Boring Stuff with Python
How to Install Pip on CentOS 8
How to Install PIP3 utility on Linux(RHEL/CentOS 7/8){Easy Steps} | CyberITHub

The correct syntax to install pip3 is this:

yum install python3-pip

The third site mentions to make sure that the EPEL repository is installed and enabled, which I know does not exist in v16 in favor of sangoma-devel16:

I suppose there isn’t a simple way to add pip3 to the Sangoma OS and run these utility scripts on a standard install of FreePBX v16. Perhaps there are too many dependencies with FreePBX in the version of Python it ships with?

After running the yum install command, below is the error output from the console, there’s quite a lot:

Pastebin - yum install python3-pip - FreePBX v16

I"ll keep trying, but if you come up with anything else to try, please let me know. Thanks!

Try excluding repos that get in the way

if you set up epel repo, make sure to disable it when done.

4.3.5. Adding, Enabling, and Disabling a Yum Repository).

1 Like

Excellent links, great source of information thank you! It looks like python3-pip is pulling from the sng-updates repo while python3 is pulling from sng-base:

[root@freepbx ~]# yum info python3-pip | grep -i repo
Repo        : sng-updates/7-8.2003.5.el7.sangoma/x86_64

yum info python3 | grep -i repo
Repo        : sng-base/7-8.2003.5.el7.sangoma/x86_64
Repo        : sng-base/7-8.2003.5.el7.sangoma/x86_64

I tried both the yum --disablerepo="sng-base" option as well as yum-config-manager --disable sng-base (I then re-enabled later) but it looks like sng-updates might be part of sng-base.

I did notice in one of the yum errors this:
/usr/bin/python3.6 from install of python3-3.6.8-13.el7.x86_64 conflicts with file from package python36u-3.6.7-1.ius.centos7.x86_64

It’s as if yum is trying to install a different version of pip3 than the version of Python that is currently installed.

Would it be a bad idea to do a yum remove python36u* followed by a yum install python36 (without the ‘u’)? I would hate to break anything in the FreePBX GUI or any other part of FreePBX for that matter.

Also, these are the dependencies for python36u:

[root@freepbx ~]# yum info python36u | grep -i repo
Repo        : installed
From repo   : anaconda

There might be too many snakes in this system.

Oh, by the way, these are the repos that are currently installed:

[root@freepbx ~]# yum repolist
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
repo id                                              repo name                                                                 status
sng-base/7-8.2003.5.el7.sangoma/x86_64               Sangoma-7-8.2003.5.el7.sangoma - Base                                     10,070
sng-epel/7-8.2003.5.el7.sangoma/x86_64               Sangoma-7-8.2003.5.el7.sangoma - Sangoma Epel mirror                      15,649
sng-extras/7-8.2003.5.el7.sangoma/x86_64             Sangoma-7-8.2003.5.el7.sangoma - Extras                                      413
sng-pkgs/7-8.2003.5.el7.sangoma/x86_64               Sangoma-7-8.2003.5.el7.sangoma - Sangoma Open Source Packages           2,262+19
sng-sng7php74/7-8.2003.5.el7.sangoma/x86_64          Sangoma-7-8.2003.5.el7.sangoma - Sangoma REMI PHP74 mirror                    83
sng-updates/7-8.2003.5.el7.sangoma/x86_64            Sangoma-7-8.2003.5.el7.sangoma - Updates                                   1,127

I would disable ‘*’ and then enable the two epel ones, I am unfamiliar with the “Distro” but if FreePBX is reliant on python2 , then install python3 should not be a problem as long as you return the /usr/bin/python symlink where it was.

I will accept no responsibility if you crash your system though :wink:

May be just a vm to provision your phones when you need to .

1 Like

No responsibility given haha :joy:

I am getting closer…

I followed this website and was able to get pip3 to accept and interpret a command:
python 3.4 - How to install pip in CentOS 7? - Stack Overflow

I ran these commands to install pip3 on python3.4:

yum install python34
wget https://bootstrap.pypa.io/pip/3.4/get-pip.py
python3.4 get-pip.py

The output:

[root@freepbx src]# python3.4 get-pip.py
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pip<19.2
  Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl
Installing collected packages: pip, wheel
  Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
Successfully installed pip-19.1.1 wheel-0.33.6

It says pip3 v22.0.4 is installed, but for the life of me I don’t see it anywhere and can’t get it to run! Now, when I try install the pip3 package requirements, it says that I need either Python 2.7, 3.5, or later :

[root@freepbx certutils]# pip3 install -r requirements.txt
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting cryptography (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/ca/9a/7cece52c46546e214e10811b36b2da52ce1ea7fa203203a629b8dfadad53/cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl
Collecting lxml (from -r requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/e1/f5/5eb3b491958dcfdcfa5daae3c655ab59276bc216ca015e44743c9c220e9e/lxml-4.4.0.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: This lxml version requires Python 2.7, 3.5 or later.
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ieylurxx/lxml/

And the requirements.txt file:

cryptography
lxml

Getting more closer…

I went back a VM snapshot and ran this:

yum install python36u-pip

Pip installed successfully, but still won’t execute, so it might have something to do with the symlinks now:

[root@freepbx certutils]# pip3 install -r requirements.txt
-bash: pip3: command not found
[root@freepbx certutils]#

You should look into python’s support for ‘virtual environments’.