How to install python pip on CentoOS Core Enterprise

Imagine this: You’ve just spun up a fresh CentOS Core Enterprise server for your next big project. You’re ready to automate, deploy, or analyze—but the moment you try pip install, you hit a wall. No pip. No Python package manager. Frustrating, right?

CentOS Core Enterprise keeps things lean and secure, but that means pip isn’t available out of the box. If you want to install Python packages, you’ll need to unlock the right repositories first. Let’s walk through the process, step by step, and I’ll share some hard-earned tips so you don’t waste time on common pitfalls.

Step 1: Enable EPEL Repository

The Extra Packages for Enterprise Linux (EPEL) repository is your gateway to modern Python tools on CentOS. Without EPEL, pip is nowhere to be found.

sudo yum install epel-release

Tip: If you’re running on a minimal install, make sure your network is configured and yum is working. EPEL is maintained by Fedora and is safe for enterprise use.

Step 2: Install pip for Python 2 (Legacy)

With EPEL enabled, you can now install pip for Python 2. But let’s be real: Python 2 is obsolete. Only use this if you’re stuck maintaining legacy code.

sudo yum install python-pip

Gotcha: This will install pip for Python 2.x. Most modern packages require Python 3. If you’re starting fresh, skip ahead.

Step 3: Install Python 3 and pip (Recommended)

For new projects, Python 3 is the only sane choice. Here’s how to get both Python 3 and its pip:

sudo yum install python3-pip
sudo pip3 install --upgrade pip

Pro Tip: Always upgrade pip after installing. The default version from yum is often outdated and may not support the latest Python packages.

Final Thoughts

CentOS Core Enterprise is rock-solid, but it makes you work for modern Python tooling. Enable EPEL, choose Python 3, and always keep pip up to date. If you run into dependency errors or missing packages, double-check your repositories and consider using virtualenv for isolated environments.

Now you’re ready to install anything from requests to flask—and get back to building something awesome.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *