This error occurs when installing
pytz using pip v1.4 or newer, due to this change in behaviour:
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
pip installcommand also supports a
--preflag that will enable installing pre-releases and development releases.
Public version identifiers MUST comply with the following scheme:
pytz versions like
2013b do not match this format, version 1.4+ of pip is treating all versions of
pytz as pre-release versions, and is not installing them by default.
If you are only installing
pytz, you can use the
--pre flag to avoid this behaviour, but you wouldn’t want to use this flag for installing your entire project’s requirements: some packages might have unstable pre-release versions you don’t want. In that case, use the behaviour described above: if you specify a “pre-release” version number for the package, then pip will search for “pre-release” versions of the package. So I’ve added this to my
When I upgrade my packages, pip will now correctly search for and install the latest version of
Stop Press: As described in the PyTz bug report, the version numbering of pytz has now been changed to, for example, 2013.7 – so once you have upgraded to this, the problem should no longer occur.