Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top