Modern Python Projects Transcripts
Chapter: Course conclusion and review
Lecture: pipx
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Sometimes you want to have a Python package that is available globally on your computer. For example, the code formatter black or code Linter flake 8.
0:10
Those are packages that you want to use in all your projects or even outside of
0:15
any project. So there is no point in installing them inside the virtual environment,
0:20
because then you'll always have to activate the virtual environment. Run black or flake 8 command, and then deactivate it. I mean,
0:28
you can do this, but that's very inconvenient. So a much better way is to use a tool called pipx.
0:34
pipx will install each package in a separate virtual environment, but at the same time they will be available globally.
0:42
So for you, there will be no difference in how you use them. You will just call black or flake 8 in your terminal,
0:48
but at the same time, because they're installed inside virtual environments.
0:53
pipx will make sure that their dependencies don't conflict with each other.