I'm a strong pyenv
and poetry
user that's beginning to use pipx
and looking to learn more about how it works. Specifically, I'd like to understand how it determines which Python version to use when installing.
I've noticed that it seems to search PATH
for existing references to applications when you pipx install <package>
to make existing installations accessible globally. This, for instance, works well with pyenv
where it pipx
will find a version of the package you install across any Python versions installed via pyenv
.
pipx install cookiecutter
⚠️ Note: cookiecutter was already on your PATH at ~/.pyenv/shims/cookiecutter
installed package cookiecutter 1.7.3, Python 3.9.6
These apps are now globally available
- cookiecutter
done! ✨ ✨
But what if it's a package you've never installed before? And there's a package version compatible with 3.6, 3.7, 3.8 – how will it determine with Python version to use when installing this package?