Fundamentals 6 min read

8 Essential Ways to Install Python Packages: From easy_install to pipx

This article outlines eight practical methods for installing Python packages—including easy_install, pip, pipx, setup.py, yum, pipenv, poetry, and curl pipelines—providing command examples and usage tips for each approach.

Python Crawling & Data Mining
Python Crawling & Data Mining
Python Crawling & Data Mining
8 Essential Ways to Install Python Packages: From easy_install to pipx

1. Use easy_install

easy_install

is an older package installer that is rarely used today. Below are some installation examples:

# Find the latest version on PyPI and install
$ easy_install pkg_name

# Install or upgrade from a specific download page
$ easy_install -f http://pythonpaste.org/package_index.html 

# Install from a direct URL
$ easy_install http://example.com/path/to/MyPackage-1.2.3.tgz

# Install from a local .egg file
$ easy_install xxx.egg

2. Use pip install

pip is the most common package manager. Use pip install <package> to search and install a package from PyPI.

Some common examples:

$ pip install requests

# Install from a local wheel directory
$ pip install --no-index --find-links=/local/wheels pkg

# Install a specific version
$ pip install pkg==2.1.2

# Install a minimum version
$ pip install pkg>=2.1.2

# Install a maximum version
$ pip install pkg<=2.1.2

For more pip usage, see the author’s detailed guide.

3. Use pipx

pipx installs and manages CLI applications in isolated virtual environments.

First install pipx:

$ python3 -m pip install --user pipx
$ python3 -m userpath append ~/.local/bin

Then install a package: $ pipx install pkg Refer to the author’s article for more pipx usage.

4. Use setup.py

If you have a setup.py file, install the package directly:

# Install from source
$ python setup.py install

5. Use yum (rpm packages)

When building a package with setup.py, you can create an RPM using the bdist_rpm option. $ python setup.py bdist_rpm Install the resulting RPM with:

# Using yum
$ yum install pkg

# Using rpm directly
$ rpm -ivh pkg

6. Use pipenv

Within a pipenv virtual environment, install a package with:

$ pipenv install pkg

7. Use poetry

If you manage dependencies with poetry, install a package using:

# Install a regular dependency
$ poetry add pkg

# Install as a development dependency
$ poetry add pytest --dev

8. Use curl + pipe

Some third‑party tools can be installed by piping a script from a URL directly to Python: $ curl -sSL <url> | python For example, poetry can be installed this way:

$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python

These eight methods cover most common ways to install Python packages, from legacy tools to modern environment‑aware installers.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Poetrypipyumpipxsetup.pyeasy_installpackage installation
Python Crawling & Data Mining
Written by

Python Crawling & Data Mining

Life's short, I code in Python. This channel shares Python web crawling, data mining, analysis, processing, visualization, automated testing, DevOps, big data, AI, cloud computing, machine learning tools, resources, news, technical articles, tutorial videos and learning materials. Join us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.