Last modified: May 28, 2025 By Alexander Williams
How to Install Python Package with easy_install
easy_install is a Python package manager. It simplifies package installation. It is part of the setuptools library.
This guide will show you how to use easy_install
. You will learn to install packages quickly and easily.
Table Of Contents
What is easy_install?
easy_install
is a tool for installing Python packages. It fetches packages from PyPI (Python Package Index). It handles dependencies automatically.
While newer tools like Pipenv and Conda exist, easy_install
is still useful. It is simple and works well for basic tasks.
Installing setuptools
Before using easy_install
, you need setuptools. Setuptools is a library for package management. It includes easy_install
.
Install setuptools with this command:
pip install setuptools
This will install the latest version. You can then use easy_install
.
Basic Usage of easy_install
To install a package, use the easy_install
command. The syntax is simple. Just type the package name.
easy_install package_name
For example, to install requests, run:
easy_install requests
The output will show the installation progress. It will also list any dependencies.
Searching for requests
Best match: requests 2.25.1
Adding requests 2.25.1 to easy-install.pth file
Installed /path/to/site-packages/requests-2.25.1-py3.8.egg
Processing dependencies for requests
Finished processing dependencies for requests
Installing Specific Versions
You can install a specific version of a package. Use the ==
operator.
easy_install requests==2.25.1
This ensures you get the exact version you need. It is useful for compatibility.
Upgrading Packages
To upgrade a package, use the -U
flag. This will install the latest version.
easy_install -U requests
The output will confirm the upgrade. It will show the new version.
Installing from Source
You can install packages from source files. This is useful for local development. Use the path to the source.
easy_install /path/to/package.tar.gz
For more details, see our guide on installing from .tar.gz files.
Uninstalling Packages
easy_install
does not have an uninstall feature. To remove a package, use pip
.
pip uninstall package_name
This is a limitation of easy_install
. Consider using pip
for uninstalls.
Common Issues and Fixes
Sometimes, easy_install
may fail. Here are common issues and fixes.
Permission Denied: Run with sudo
if needed.
sudo easy_install package_name
Package Not Found: Check the package name on PyPI. Ensure it exists.
Network Issues: Verify your internet connection. Proxy settings may also cause problems.
Conclusion
easy_install
is a simple tool for installing Python packages. It handles dependencies and is easy to use.
For more advanced features, consider Poetry or requirements.txt. These offer better dependency management.
Now you know how to use easy_install
. Happy coding!