Skip to content


Fix on python_version 2.x.x+ #80

merged 1 commit into from

2 participants


platform.python_version() may return also a version that is of the form 2.x.x+, when such argument gets passed to StrictVersion it will throw this exception:

  ValueError: invalid version number '2.x.x+'

This bug occurs on ubuntu oneiric (11.10 LTS) that has a python version of 2.7.2+.

@gleicon gleicon merged commit 9971dfd into fiorix:master

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 2 additions and 2 deletions.
  1. +2 −2
@@ -19,7 +19,7 @@
import platform
from distutils import log
from distutils.core import setup
-from distutils.version import StrictVersion
+from distutils.version import StrictVersion, LooseVersion
requires = ["twisted"]
@@ -29,7 +29,7 @@
# avoiding installation problems on old RedHat distributions (ex. CentOS 5)
py_version = platform.python_version()
-if StrictVersion(py_version) < StrictVersion('2.6'):
+if LooseVersion(py_version) < StrictVersion('2.6'):
distname, version, _id = platform.dist()
distname, version, _id = platform.linux_distribution()
Something went wrong with that request. Please try again.