You are using pip3 to install flask-script which is associated with python 3.5. However, you are trying to upgrade pip associated with the python 2.7, try running pip3 install --upgrade pip.

It might be a good idea to take some time and read about virtual environments in Python. It isn't a best practice to install all of your packages to the base python installation. This would be a good start: http://docs.python-guide.org/en/latest/dev/virtualenvs/

Answer from JanHak on Stack Overflow
🌐
CyberITHub
cyberithub.com › how-to-install-pip3-utility-on-linux-rhel-centos-7-8-easy-steps
How to Install PIP3 utility on Linux(RHEL/CentOS 7/8){Easy Steps} | CyberITHub
March 6, 2021 - Before you go through the steps to install pip3 utility on RHEL/CentOS Based Servers, it is always recommended to first update your server using yum update -y command as shown below.
Discussions

python - Recommended way to install pip(3) on centos7 - Stack Overflow
It need to do an upgrade on pip3 to work correctly for me: pip3 install --upgrade pip 2023-08-15T05:31:52.04Z+00:00 ... yum install python36 yum install python36-devel yum install python36-setuptools easy_install-3.6 pip ... There is now a python3-pip package in the CentOS 7 base repository ... More on stackoverflow.com
🌐 stackoverflow.com
October 16, 2019
python 3.4 - How to install pip in CentOS 7? - Stack Overflow
How do I access pip from the Python 3.4 package in CentOS 7 EPEL release? ... I looked through there, but nothing relates unfortunately. ... So there's no pip34 binary? Well, you will always be able to call pip via python -m pip if it is installed. If it is not installed python -m ensurepip can be used to bootstrap it. You may need elevated rights to call the latter command... More on stackoverflow.com
🌐 stackoverflow.com
python - How do I install pip on CentOS? - Unix & Linux Stack Exchange
I'm using CentOS 7. I want to use Pip to install a virtualenv . So I installed Pip like so ... [laredotornado@server Python-3.7.2]$ sudo yum install python-pip httpd mod_wsgi [sudo] password for More on unix.stackexchange.com
🌐 unix.stackexchange.com
February 19, 2019
python - How to install pip specifically for Python3 on CentOS 7? - Stack Overflow
Yes, but the problem is that running ... Python2.7.5. ... I see. How about running pip3? Does it show something to you? ... No, bash: pip3: command not found.... ... Think you've done a lot of work for a beginner unnecessarily. Try installing the python36 package that's the default supported python3.x series in centos ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Linux Stans
linuxstans.com › install-pip-centos
How to Install Pip (Python 3) on CentOS - Linux Stans
March 4, 2024 - This tutorial will work for CentOS 7, CentOS 8, and even Fedora. ... When trying to run a pip command, it means that pip isn’t installed on your CentOS. If you’re running Ubuntu, check this tutorial instead. ... A CentOS system. It’s usually a Linux VPS. You can get a Linux server from Linode. Root access to your CentOS system. The commands in this tutorial should be/are executed by the root/sudo user. Python 3. If you have Python 2, you need to upgrade ASAP.
🌐
Linux Hint
linuxhint.com › install-python-pip-centos7
Install Python PIP on CentOS7 – Linux Hint
In this article, I will show you how to install Python 2 PIP and Python 3 PIP on CentOS 7. Let’s get started. First update the package repository cache of yum package manager with the following command:
🌐
devopszones
devopszones.com › 2020 › 04 › how-to-install-and-upgrade-pip-on.html
How to Install and upgrade PIP on CentOS 7 - devopszones
root@exampleserver ~]# pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB) 100% |████...
Find elsewhere
🌐
GitHub
gist.github.com › iDoka › 9b0ece65f73df62ab779eca8ec338c70
How to install pip3 on CentOS 7 Linux? · GitHub
CentOS 7 still have Python 2.7 as the default tool. EPEL repository comes up with Python 3. Here’s the way to setup Python 3 and pip3 on CentOS environment.
🌐
NBShare
nbshare.io › notebook › 228803083 › How-to-Upgrade-Python-PIP
How to Upgrade Python PIP - Nbshare Notebooks
To install the version we can either run the command pip install --upgrade pip or do pip install pip==19.3.1
🌐
Liquid Web
liquidweb.com › home › how to install pip on centos 7
How to Install Pip on CentOS 7 | Liquid Web
November 20, 2024 - In this guide, you will be shown a few methods for installing Pip, as well as a few steps you can take to verify the installation was successful, giving you a smooth start to Python 3 package development. Let’s review how to install Pip on CentOS 7.
🌐
DreamHost
help.dreamhost.com › hc › en-us › articles › 115000699011-Using-pip3-to-install-Python3-modules
Using pip3 to install Python3 modules – DreamHost Knowledge Base
[server]$ pip3 --version pip 18.1 from /home/username/opt/python-3.6.2/lib/python3.6/site-packages/pip (python 3.6) At this point, it's a good idea to upgrade pip3.
🌐
AZDIGI
azdigi.com › home › blog › linux server › how to install pip on centos 7
How to install PIP on CentOS 7 with 2 steps
January 13, 2026 - By default, PIP is not available in the CentOS 7 repositories. To install PIP, we need to enable the EPEL repository with the command:
🌐
Python⇒Speed
pythonspeed.com › articles › upgrade-pip
Why you should upgrade pip, and how to do it
March 21, 2023 - Let’s see some symptoms so you can identify the problem, how to solve it by upgrading pip, and finally—if you’re sufficiently interested—what causes it. Let’s start out with an Ubuntu 18.04 Docker image. Released in April 2018, this version of Ubuntu has Python version 3.6, and pip version 9. [itamarst@blake dev]$ docker run -it ubuntu:18.04 root@1a43d55f0524:/# apt-get update ... root@1a43d55f0524:/# apt-get install --no-install-recommends python3 python3-pip ... root@1a43d55f0524:/# pip3 --version pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
Top answer
1 of 3
6

You should have taken the default available python3, that is the python3.6 package in centos7 that would have been easier to setup rather than compile an unsupported version. Suggest you install the supported python3 package in centos

Try doing yum install python36 from repository

sudo yum install -y https://repo.ius.io/ius-release-el7.rpm

Update yum package

 sudo yum update

Install python36 along with pip

sudo yum install -y python36u python36u-libs python36u-devel python36u-pip

Below steps are for python3.7, suggest avoiding unsupported packages. Alternate Steps for pip setup for Centos You need to install pip for python3.7 series Step 1: First install the EPEL Repository

sudo yum install epel-release

Step 2: Installing pip

python37 -m pip

Step 3: Verify if pip was installed properly pip --version

If the command not found error shows up, try

python37 -m ensurepip
2 of 3
1

I also as you said "followed these steps religiously from this link: https://tecadmin.net/install-python-3-7-on-centos/."

It was not an option for me to install python3.6, as I explicitly needed 3.7. I was able to install using the following procedure:

# AFAIK, libffi-devel solved the "ModuleNotFoundError: No module named '_ctypes'" I had when I tried installing without it. 
yum install libffi-devel 

cd /usr/src
wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz
tar xzf Python-3.7.5.tgz
cd Python-3.7.5
./configure --enable-optimizations
make install  # Or: make altinstall
python3 -V
pip3 --version
rm -f /usr/src/Python-3.7.5.tgz

What I changed from the referenced article is the version (3.7.5 instead of 3.7.4) and in addition installed "libffi-devel". It could be that this one would have solved on 3.7.4 as well.

🌐
Stack Overflow
stackoverflow.com › questions › 58984280 › pip-install-upgrade-pip-isnt-upgrading-pip
python - pip install --upgrade pip isnt upgrading pip - Stack Overflow
When I run pip install --upgrade pip --user I get the following output: Collecting pip Using cached https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl Installing collected packages: pip Successfully installed pip-8.1.2 You are using pip version 8.1.2, however version 19.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip...
🌐
ITzGeek
itzgeek.com › post › how-to-install-pip-on-centos-8-rhel-8
How To Install Pip on CentOS 8 / RHEL 8 | ITzGeek
March 6, 2020 - We will go through some basics of Pip commands. Replace pip3 with pip2 in your commands if you are using Python 2.
🌐
GitHub
github.com › pypa › pip › issues › 5662
Cannot upgrade pip on centos · Issue #5662 · pypa/pip
July 27, 2018 - OS: LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.5.1804 (Core) Release: 7.5.1804 Codename: Core · Description # pip install --upgrade pip Looking in indexes: http://mirrors.cloud.a...
Author   pypa