Search code examples
pythonpippypi

Python packages and default/recommended versions


Let's say I have a package MyPackage hosted on Pypi with two versions: 1.0 and 2.0

When a user runs the command pip install MyPackage I want them to download and install 1.0. Is it possible to set a default/recommended package version in this manner?

I want to stray away from doing any beta releases i.e. 2.0b1


Solution

  • No, this is not possible. pip install MyPackage will always install the highest available version of MyPackage, excluding prelease ("beta") versions unless the --pre flag is given. There are no provisions anywhere in the packaging system for it to do anything else.