A lightweight, standalone Python script to list available versions of a Python package hosted on PyPI. It inspects the wheels to show support across Linux, Windows, and macOS (specifically differentiating between Apple Silicon arm64, Intel x86_64, and universal2 builds!).
First, grab the code:
git clone https://github.com/digitalowlnyc/python-package-version-helper
cd python-package-version-helper
chmod +x pyversionshelper.pyYou can create an alias in your shell configuration profile (like ~/.zshrc or ~/.bashrc) so that you can call the command rapidly from anywhere on your system.
echo "alias pyversionshelper='$PWD/pyversionshelper.py'" >> ~/.zshrc
source ~/.zshrcAlternatively, you can create a symbolic link into a folder that is already in your $PATH, like /usr/local/bin:
ln -s $(pwd)/pyversionshelper.py /usr/local/bin/pyversionshelperSimply run the command with the package you want to query:
$ pyversionshelper torchOutput:
Fetching version info for 'torch'...
Available versions for torch:
(Showing latest 15 of 46 versions)
2.9.1 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.9.0 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.8.0 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.7.1 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.7.0 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.6.0 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.5.1 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.5.0 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.4.1 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.4.0 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.3.1 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.3.0 -> Platforms: Linux, Windows, macOS (Apple Silicon)
2.2.2 -> Platforms: Linux, Windows, macOS (Apple Silicon), macOS (Intel)
2.2.1 -> Platforms: Linux, Windows, macOS (Apple Silicon), macOS (Intel)
2.2.0 -> Platforms: Linux, Windows, macOS (Apple Silicon), macOS (Intel)
Use --limit all for all versions. Example:
$ pyversionshelper torch --limit allMIT, free to use however you want.