Install Python pip on CentOS Core Enterprise

Updated Last updated: April 7, 2026 · Originally published: May 18, 2022

Why Installing pip on CentOS Core Enterprise Can Be Tricky

📌 TL;DR: Why Installing pip on CentOS Core Enterprise Can Be Tricky Picture this: you’ve just deployed a pristine CentOS Core Enterprise server, brimming with excitement to kick off your project.
🎯 Quick Answer: Install pip on CentOS Core Enterprise by first enabling EPEL: sudo yum install -y epel-release, then sudo yum install -y python3-pip. For CentOS without EPEL access, download get-pip.py with curl and run python3 get-pip.py.

Picture this: you’ve just deployed a pristine CentOS Core Enterprise server, brimming with excitement to kick off your project. You fire up the terminal, ready to install essential Python packages with pip, but you hit an obstacle—no pip, no Python package manager, and no straightforward solution. It’s a frustrating roadblock that can halt productivity in its tracks.

CentOS Core Enterprise is admired for its stability and security, but this focus on minimalism means you won’t find pip pre-installed. This intentional omission ensures a lean environment but leaves developers scrambling for modern Python tools. Fortunately, with the right steps, you can get pip up and running smoothly. Let me guide you through the process, covering everything from prerequisites to troubleshooting, so you can avoid the common pitfalls I’ve encountered over the years.

Understanding the Challenge

CentOS Core Enterprise is designed for enterprise-grade reliability. This means it prioritizes security and stability over convenience. By omitting tools like pip, CentOS ensures that the server environment remains focused on critical tasks without unnecessary software that could introduce vulnerabilities or clutter.

While this approach is excellent for production environments where minimalism is key, it can be frustrating for developers who need a flexible setup to test, prototype, or build applications. Python, along with pip, has become the backbone of modern development workflows, powering everything from web apps to machine learning. Without pip, your ability to install Python packages is severely limited.

To overcome this, you must understand the nuances of CentOS package management and the steps required to bring pip into your environment. Let’s dive into the step-by-step process.

Step 1: Verify Your Python Installation

Before diving into pip installation, it’s essential to check if Python is already installed on your system. CentOS Core Enterprise might include Python by default, but the version could vary.

python --version
python3 --version

If these commands return a Python version, you’re in luck. However, if they return an error or an outdated version (e.g., Python 2.x), you’ll need to install or upgrade Python. Python 3 is the recommended version for most modern projects.

Pro Tip: If you’re working on a legacy system that relies on Python 2, consider using virtualenv to isolate your Python environments and avoid conflicts.

Step 2: Enable the EPEL Repository

The Extra Packages for Enterprise Linux (EPEL) repository is a lifesaver when working with CentOS. It provides access to additional software packages, including pip. Enabling EPEL is the first critical step.

sudo yum install epel-release

Once installed, update your package manager to ensure it’s aware of the new repository:

sudo yum update
Warning: Ensure your system has an active internet connection before attempting to enable EPEL. If yum cannot connect to the repositories, check your network settings and proxy configurations.

Step 3: Installing pip for Python 2 (If Required)

While Python 2 has reached its end of life and is no longer officially supported, some legacy applications may still depend on it. If you’re in this situation, here’s how to install pip for Python 2:

sudo yum install python-pip

After installation, verify that pip is working:

pip --version

If the command returns the pip version, you’re good to go. However, keep in mind that many modern Python packages no longer support Python 2, so this path is only recommended for maintaining existing systems.

Warning: Proceed with caution when using Python 2. It’s obsolete, and using it in new projects could introduce security risks.

Step 4: Installing Python 3 and pip (Recommended)

For new projects and modern applications, Python 3 is the gold standard. The good news is that installing Python 3 and pip on CentOS Core Enterprise is straightforward once EPEL is enabled.

sudo yum install python3

This command installs Python 3 along with its bundled version of pip. After installation, you can upgrade pip to the latest version:

sudo pip3 install --upgrade pip

Verify the installation:

python3 --version
pip3 --version

Both commands should return the respective versions of Python 3 and pip, confirming that everything is set up correctly.

Pro Tip: Always upgrade pip after installing. The default version provided by yum is often outdated, which may cause compatibility issues with newer Python packages.

Step 5: Troubleshooting Common Issues

Despite following the steps, you might encounter some hiccups along the way. Here are common issues and how to resolve them:

1. yum Cannot Find EPEL

If enabling EPEL fails, it’s often due to outdated yum repository data. Try running:

sudo yum clean all
sudo yum makecache

Then, attempt to install EPEL again.

2. Dependency Errors During Installation

Sometimes, installing Python or pip may fail due to unmet dependencies. Use the following command to identify and resolve them:

sudo yum deplist python3

This command lists the required dependencies for Python 3. Install any missing ones manually.

3. pip Command Not Found

If pip or pip3 isn’t recognized, ensure that the installation directory is included in your system’s PATH variable:

export PATH=$PATH:/usr/local/bin

To make this change permanent, add the line above to your ~/.bashrc file and reload it:

source ~/.bashrc

Step 6: Managing Python Environments

Once Python and pip are installed, managing environments is crucial to avoid dependency conflicts. Tools like virtualenv and venv allow you to create isolated Python environments tailored to specific projects.

Using venv (Built-in for Python 3)

python3 -m venv myproject_env
source myproject_env/bin/activate

While activated, any Python packages you install will be isolated to this environment. To deactivate, simply run:

deactivate

Using virtualenv (Third-Party Tool)

If you need to manage environments across Python versions, install virtualenv:

sudo pip3 install virtualenv
virtualenv myproject_env
source myproject_env/bin/activate

Again, use deactivate to exit the environment.

Pro Tip: Consider using Pipenv for an all-in-one solution to manage dependencies and environments.

Step 7: Additional Considerations for Production

In production systems, you may need stricter control over your Python environment. Consider the following:

  • System Integrity: Avoid installing libraries globally if possible. Use virtual environments to prevent conflicts between applications.
  • Automation: Use configuration management tools like Ansible or Puppet to automate Python and pip installations across servers.
  • Security: Always keep Python and pip updated to patch vulnerabilities. Regularly audit installed packages for outdated or potentially insecure versions.

These practices will help you maintain a secure and efficient production environment.

Quick Summary

  • CentOS Core Enterprise doesn’t include pip by default, but enabling the EPEL repository unlocks access to modern Python tools.
  • Python 3 is the recommended version for new projects, offering better performance, security, and compatibility.
  • Always upgrade pip after installation to ensure compatibility with the latest Python packages.
  • Use tools like venv or virtualenv to manage isolated Python environments and prevent dependency conflicts.
  • If you encounter issues, focus on troubleshooting repository access, dependency errors, and system paths.

With pip installed and configured, you’re ready to tackle anything from simple scripts to complex deployments. Happy coding!

🛠 Recommended Resources:

Tools and books mentioned in (or relevant to) this article:

📋 Disclosure: Some links are affiliate links. If you purchase through these links, I earn a small commission at no extra cost to you. I only recommend products I have personally used or thoroughly evaluated.


📚 Related Articles

📊 Free AI Market Intelligence

Join Alpha Signal — AI-powered market research delivered daily. Narrative detection, geopolitical risk scoring, sector rotation analysis.

Join Free on Telegram →

Pro with stock conviction scores: $5/mo

Get Weekly Security & DevOps Insights

Join 500+ engineers getting actionable tutorials on Kubernetes security, homelab builds, and trading automation. No spam, unsubscribe anytime.

Subscribe Free →

Delivered every Tuesday. Read by engineers at Google, AWS, and startups.

Frequently Asked Questions

What is Install Python pip on CentOS Core Enterprise about?

Why Installing pip on CentOS Core Enterprise Can Be Tricky Picture this: you’ve just deployed a pristine CentOS Core Enterprise server, brimming with excitement to kick off your project. You fire up t

Who should read this article about Install Python pip on CentOS Core Enterprise?

Anyone interested in learning about Install Python pip on CentOS Core Enterprise and related topics will find this article useful.

What are the key takeaways from Install Python pip on CentOS Core Enterprise?

It’s a frustrating roadblock that can halt productivity in its tracks. CentOS Core Enterprise is admired for its stability and security, but this focus on minimalism means you won’t find pip pre-insta

📧 Get weekly insights on security, trading, and tech. No spam, unsubscribe anytime.

Also by us: StartCaaS — AI Company OS · Hype2You — AI Tech Trends