The most popular Python package manager, pip, used to be included in a typical Python install, but lately it's been excluded. Pip is a useful tool for both running Python scripts and for developing them, and it's easy to install. There are just two steps to install pip on Linux:

1. Get the installer

Now that you've install pip, you might want to know more about what it's good for. Here are some basic used of the `pip` command.

Install dependencies {#_install_dependencies}

When you download a Python script or an application written in Python, it may require specific Python libraries (or "modules", in Python terminology) in order to run. An application may not bundle support libraries along with its own code because the library isn't maintained by the same developer. Were it bundled along with unrelated application code, it would be difficult for you to update it independently of the application.

Usually, a developer includes a list of dependencies in a file called `requirements.txt` in the application directory. If that file exists, you can process it with pip:

If the developer hasn't included a list of dependencies, then it's up to you to read the documentation to learn the what dependencies are required.

If you install software with

dnf

or

Flatpak

, you may never have to use pip for this, because those packaging systems install dependencies automatically.

Install a Python utility {#_install_a_python_utility}

You can use pip for quick installs of useful Python utilities. For instance, `yamllint` is a must-have command for anyone writing

YAML

files, whether it's for Kubernetes or

Ansible

or just for arbitrary config files. It's one `pip` command away:

Or maybe you want to try the

Ranger

file manager:

There's a lot out there for Python, so have a look at

Python Package Index (PyPi)

to see what's available.

See installed packages {#_see_installed_packages}

To see what Python packages you've already got installed, use the `freeze` command:

Using pip {#_using_pip}

Pip works well for both users without root access and developers using Python virtual environments. It's an easy command to use, and it helps you manage your Python install.

Proxied content from gemini://sdf.org/klaatu/geminifiles/install-pip.gmi (external content)

Gemini request details:

Original URL
gemini://sdf.org/klaatu/geminifiles/install-pip.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.