9

When I compile pyQt on Windows 7 it returns an error saying:

Traceback (most recent call last):
   File "configure.py", line 32, in <module>
       import sipconfig
ImportError: No module named sipconfig

I have configured sip but the error still occurs. Can anyone help?

sipsorcery
  • 30,273
  • 24
  • 104
  • 155
Python Kid
  • 313
  • 2
  • 7
  • 19

3 Answers3

9

The same happened to me on OSX.

As @Janne Karila suggested, you need to download and build SIP first. In the extracted sip source folder issue these commands in a terminal:

python configure.py
make
sudo make install

After that (in case it succeeds) you should be able to build PyQt in his folder using the same 3 commands.

Attila Fulop
  • 6,861
  • 2
  • 44
  • 50
1

When building sip, try using sudo so you can write the files to the /System directory:

sudo python configure.py
sudo make
sudo make install

I had same issue, then looked at the install directories and noticed files where not there, so I used sudo and successfully built it. Got PyQt built as well.

marcospereira
  • 12,045
  • 3
  • 46
  • 52
  • It is enough to use sudo for `make install` command only, if you need it to be installed in system dirs. Using sudo for configure and make is not a good idea because of changed files permissions, different env etc. – pptaszni Oct 29 '19 at 15:43
0

After downloading the sip from here download. Extract the sip folder in the PyQt4 folder

cd sip-version
python configure.py
make
make install

From the same location and it will compile and save to C:\Python folder

jackotonye
  • 3,537
  • 23
  • 31