Incorrect check of SIP version during PyQt installation
Asked Answered
L

2

6

I have been trying to install PyQt on my mac (OSX 10.6.8), but I still having this problem:

When I try to install PyQt-mac-gpl-4.9.6, I get this

Error: This version of PyQt requires SIP v4.14.2 or later.

The weird thing is that when I want to check for sip version on the console and write

sip -V

,I get the correct version: 4.14.2

I have checked my PATH but non of the online tips that I have found have helped me. How do I fix this?

Lien answered 14/12, 2012 at 8:46 Comment(2)
did you try to reinstall SIP?Shivery
yes, I have uninstall sip and re-installed, but same error, thanks for your timeLien
B
4

I would recommend checking to see if you have sip installed in different locations, with the newer version being in a path that is not at the head of your PATH.

mdfind -name sip | grep '/bin/'

This should tell you all of the sip binaries on your computer. Check the version of all of them, and then make sure that path is at the front of PATH

What it could actually be, regardless of it seeming like you only have one sip, is a leftover .pyc file that is getting picked up before your intended sip. Try this to confirm:

$ python
>>> import sipconfig
>>> print sipconfig

This will tell you where it is finding sipconfig. If it looks like the wrong spot, or if you check it and all that is left is the pyc file, remove it. Then your newer sip should be found properly.

Blau answered 15/12, 2012 at 21:47 Comment(1)
Correct @Blau I had the same problem and it turned out to be a pyc file that had been left behind from previous installationJump
T
3

I had a similar issue after installing sip 4.14.2 over a previous version of 4.13.1 on Mac OSX 10.7.4 and Python 2.7. Strangely, the version of sip from the command line was different from the version from the Python sipconfig module.

$ sip -V
4.14.2
$ python -c "import sipconfig; print sipconfig.version_to_string(sipconfig.Configuration().sip_version)"
4.13.1

I ran through the install again, this time with running the install step as 'sudo make install' and the two versions matched at 4.14.2 and the PyQt instal was successful.

$ cd ~/Downloads/sip-4.14.2/
$ python configure.py
$ make
$ sudo make install
Torrens answered 17/1, 2013 at 1:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.