Odd version scheme

Ian Kelly ian.g.kelly at gmail.com
Thu Feb 12 11:56:25 EST 2015


On Thu, Feb 12, 2015 at 9:45 AM, Gisle Vanem <gvanem at yahoo.no> wrote:
> I tried using Interactive Python with a PyQt4 console:
>   "IPython.exe qtconsole"
>
> But got a
>   "ImportError: IPython requires PyQT4 >= 4.7, found 4.10.4"
>
> Looking at Ipython's check (in site-packages\IPython\external\qt.py):
>   if QtCore.PYQT_VERSION_STR < '4.7':
>       raise ImportError("IPython requires PyQt4 >= 4.7, found
> %s"%QtCore.PYQT_VERSION_STR)
>
> So even if '4.10' < '4.7', my '4.10' is newer. What odd version scheme is
> this really? I just edited that line to read:
>  if QtCore.PYQT_VERSION_STR < '4.10':
>
> Seems to be working fine now.

There's nothing wrong with the version scheme; 4.10 is a greater
version than 4.7. The problem appears to be IPython using a simple
lexicographical string comparison to compare the version numbers and
failing when it gets to a number that isn't a single digit.



More information about the Python-list mailing list