If you think that the python and pip commands cannot be used on CenoOS, they are not installed, and even if you install them, they will not use the ones installed by default, so you had to set them.
https://dev.classmethod.jp/articles/in-search-of-lost-python-at-rhel-8/#toc-3
For the time being, install all python modules
dnf install python36*
Or
yum -y install python36*
If you want to install the pip command, you can install the following packages.
rpm -qf /bin/pip3
python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64
rpm -qf /bin/pip3.6
python3-pip-9.0.3-16.el8.noarch
Just installing it does not use the installed python as the system default, so execute the following command to select the installed python version. Below, select "2" and press enter.
alternatives --config python
There are 2 programs'python'To provide.
Select command
-----------------------------------------------
*+ 1 /usr/libexec/no-python
2 /usr/bin/python3
Press Enter to select the current[+]Or enter the selection number:2
python --version
Python 3.6.8
Also here, execute the following command to create an environment where the installed pip3 command can be executed.
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
pip --version
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)
Recommended Posts