Incorrect check of SIP version during PyQt installation

user1903428 picture user1903428 · Dec 14, 2012 · Viewed 9.9k times · Source

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?

Answer

jdi picture jdi · Dec 15, 2012

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.