# to check where config comes from$python-mpipconfigdebugenv_var:env:global:/etc/xdg/pip/pip.conf,exists:False/etc/pip.conf,exists:Trueglobal.index-url:https://private.artifactory.com/artifactory/api/pypi/tools/simplesite:/usr/pip.conf,exists:Falseuser:/home/marslo/.pip/pip.conf,exists:False/home/marslo/.config/pip/pip.conf,exists:False
$pipxrunBINARY# latest version of binary is run with python3$pipxrun--specPACKAGE==2.0.0BINARY# specific version of package is run$pipxrun--pythonpython3.10BINARY# Installed and invoked with specific Python version$pipxrun--pythonpython3.9--specPACKAGE=1.7.3BINARY$pipxrun--specgit+https://url.gitBINARY# latest version on default branch is run$pipxrun--specgit+https://url.git@branchBINARY$pipxrun--specgit+https://url.git@hashBINARY$pipxrunpycowsaymoo$pipx--version# prints pipx version$pipxrunpycowsay--version# prints pycowsay version$pipxrun--pythonpythonXpycowsay$pipxrunpycowsay==2.0--version$pipxrunpycowsay[dev]--version$pipxrun--specgit+https://github.com/psf/black.gitblack$pipxrun--specgit+https://github.com/psf/black.git@branch-nameblack$pipxrun--specgit+https://github.com/psf/black.git@git-hashblack$pipxrun--spechttps://github.com/psf/black/archive/18.9b0.zipblack--help$ pipx run https://gist.githubusercontent.com/cs01/fa721a17a326e551ede048c5088f9e0f/raw/6bdfbb6e9c1132b1c38fdd2f195d4a24c540c324/pipx-demo.py
$pipinstallpipxerror:externally-managed-environment×Thisenvironmentisexternallymanaged╰─> ToinstallPythonpackagessystem-wide,trybrewinstallxyz,wherexyzisthepackageyouaretryingtoinstall.Ifyouwishtoinstallanon-brew-packagedPythonpackage,createavirtualenvironmentusingpython3-mvenvpath/to/venv.Thenusepath/to/venv/bin/pythonandpath/to/venv/bin/pip.Ifyouwishtoinstallanon-brewpackagedPythonapplication,itmaybeeasiesttousepipxinstallxyz,whichwillmanageavirtualenvironmentforyou.Makesureyouhavepipxinstalled.note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint:SeePEP668forthedetailedspecification.
changelog : 23.2 (2023-07-15) Deprecate support for eggs for Python 3.11 or later, when the new importlib.metadata backend is used to load distribution metadata. This only affects the egg distribution format (with the .egg extension); distributions using the .egg-info metadata format (but are not actually eggs) are not affected. For more information about eggs, see relevant section in the setuptools documentation
solution
$piplistWARNING: Skipping /usr/local/lib/python3.12/site-packages/six-1.16.0-py3.12.egg-info due to invalid metadata entry 'name'
$pipunisntallsix$rm-rf/usr/local/lib/python3.12/site-packages/six-1.16.0-py3.12.egg-info# if necessary$rm-rf/usr/local/lib/python3.12/site-packages/six-1.16.0-py3.12.dist-info$pipinstallsix