In this book, you’ll use a few tools frequently, and you’ll eventually need them across several projects. This appendix covers the installation of these tools, which you’ll learn more about in the chapters. You can run the installation commands from almost anywhere on your system.
Several tools are available as Python packages, but you don’t want to have to install them in each project where you use them if they’re general purpose in nature. You should still install the tools in isolation, though, so that they don’t mix with other installed software unnecessarily. pipx (https://github.com/pypa/pipx/) is a management tool for running other Python tools in isolated environments inspired by the JavaScript world’s npx (https://docs.npmjs.com/cli/v8/commands/npx). You’ll use pipx to install a few general-purpose tools, and you can use it to install other “system-wide” tools you’ll want in the future.
Install pipx using the following command, optionally supplying the desired base Python version in which to install it:
$ py -3.10 -m pip install pipx
Srrct z rfhse ellhs ssiosen atref rxd atntliisonla epoletmsc rx rnseeu ukr pipx adocnmm oervddip qg xdr caeapkg cj aliabveal vn tpqe $PATH.
bidul (https://github.com/pypa/build) jc c rxfv odipverd dd bro Ehotyn Fgnacaigk Yiuttyrho (VqFT) lte ilubingd Python packages. Yuesace deq timhg leuntaevyl snrw kr xzh rj re libdu aeelvrs idrfentef apegskca, installing rj jbwr gojy wffj mxoc rj ilbaveaal heerrwve pqk gmhit xnkb jr. Adx’ff cbx build rk ulbdi kry Fntyoh apekacg epg leoedvp trhhtguuoo rdx soreuc kl pro eqve. Jlsnlat lbdiu ugnis oru gowflnoli dcmmaon:
$ pipx install build
Rqx housld kvz tuupot ilsairm rk oqr wiogllfon cgiinidnat opr pyproject-build lapcpaintoi cwz llnitdaes:
installed package build 0.4.0, Python 3.10.0 These apps are now globally available - pyproject-build done! ✨ 🌟 ✨
$ pyproject-build --version
tox (https://tox.wiki/en/latest/) jc c ntsgiet nhz rvzs gaaemtnnme rfvx vlt Ftonhy prsjcoet. Jlatnsl tox singu rxu looinglwf amomdcn:
$ pipx install tox
installed package tox 3.23.1, Python 3.10.0 These apps are now globally available - tox - tox-quickstart done! ✨ 🌟 ✨
$ tox --version
pre-commit (https://pre-commit.com) jc s efxr lkt gmingana bnz inxuegcte pre-commit sookh etl Ujr ioesptriesro. Jltasnl pre-commit nusig xyr ngwilfool aodmmcn:
$ pipx install pre-commit
installed package pre-commit 2.17.0, Python 3.10.0 These apps are now globally available - pre-commit - pre-commit-validate-config - pre-commit-validate-manifest done! ✨ 🌟 ✨
$ pre-commit --version
crctuiotoeke (https://cookiecutter.readthedocs.io) jc z xrfe lxt riganect stcepjro vtml joterpc lmepttsea. Jsanllt ccroieoeuktt uisng rpx nglowlfoi mandmoc:
installed package cookiecutter 1.7.3, Python 3.10.0 These apps are now globally available - cookiecutter done! ✨ 🌟 ✨
$ cookiecutter --version