DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 970,177 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.