In this short post you can find how to install pre-release and development packages with pip and Python.

By default pip will install the latest versions.

To install pre-release package use the next syntax:

(1) Install pre-release with flag --pre

pip install moviepy --pre

(2) Install pre-release with flag --pre and package version

pip install 'moviepy>=1.0.2,<2.0.0' --pre

For example the current latest version of package moviepy is 1.0.3. There is a fix which is part of version 2.0 which is not released yet.

All version of the package are available from Release history:

install-pre-release-package-pip-python

From the image above we can see that there are 2 pre-release versions:

  • 2.0.0.dev1
  • 2.0.0.dev2

Once you select the version which you like to install you can do it by:

pip install 'moviepy>1.0.3' --pre

To check which version is installed we can use version ( Python > 3.8):

from importlib.metadata import version
version('moviepy')

result:

'2.0.0.dev2'

This will install the pre-release version of the moviepy package.

You can find more information here: pip install - Pre-release Versions:

If a Requirement specifier includes a pre-release or development version (e.g. >=0.0.dev0) then pip will allow pre-release and development versions for that requirement. This does not include the != flag.

The pip install command also supports a --pre flag that enables installation of pre-releases and development releases.