DEV Community

Cover image for Awesome Libs: pipx
Humberto Rocha
Humberto Rocha

Posted on

Awesome Libs: pipx

(Originally posted on my blog)

I'm starting this series of posts to give you tips on libraries that can be handy on your day to day as a Developer and also to present libraries I think you should keep on eye on.

One of the perks of a good Developer is having a proper tool-set available on your belt, and nothing more appropriate to start this series than a library that installs other libraries!

How many times did you install some Python CLI tool inside of a Python virtualenv? Have you ever updated some tool dependency and if make another library stop working because it relied on a common dependency?

If you like organization, stability and to not repeat yourself pipx is an awesome lib for you.

organized kittens image

Pipx is a handy tool to isolate your Python programs into separate environments, exposing their entry points so you can run them from anywhere.

You can also easily upgrade the installed packages without having a conflict between dependencies and have some useful tools like nox, flake8, and black installed once on your system (no more installing it on every single virtualenv that you create).

To install pipx you have to run:

$ python3 -m pip install --user pipx
$ python3 -m pipx ensurepath
Enter fullscreen mode Exit fullscreen mode

The second command is to ensure that you'll have CLI access to run the programs installed with pipx.

Now, you can install your favorite Python tools in isolated environments and have fun \o/

$ pipx install pyjokes
$ pyjoke
There are two ways to write error-free programs; only the third one works.
Enter fullscreen mode Exit fullscreen mode

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay