Awesome Libs: pipx

humrochagf

Humberto Rocha

Posted on August 8, 2019

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
đź’– đź’Ş đź™… đźš©
humrochagf
Humberto Rocha

Posted on August 8, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related