Can't configure pyQt

孤者浪人 提交于 2019-12-18 04:48:10

问题


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?


回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/11841962/cant-configure-pyqt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!