最近我将我的 Ubuntu 从 10.04 升级到了 11.04。现在我在为 python 3.2 安装 PyQt4 时遇到问题。它适用于 3.1。一段时间后,当我执行 sudo make install 时,出现以下错误:
make[1]: Entering directory `/home/john/Python/PyQt-x11-gpl-4.8.5/designer
rm -f libpythonplugin.so
g++ -Wl,-O1 -shared -o libpythonplugin.so pluginloader.o moc_pluginloader.o -L/usr/lib -L/usr/lib -lpython3.1mu -lQtScript -lQtXml -lQtGui -lQtCore -lQtDesigner -lpthread
/usr/bin/ld: cannot find -lpython3.1mu
collect2: ld returned 1 exit status
make[1]: *** [libpythonplugin.so] Error 1
make[1]: Leaving directory `/home/john/Python/PyQt-x11-gpl-4.8.5/designer'
make: *** [install] Error 2
我用谷歌搜索了几个小时并没有找到任何解决方案,这真的很奇怪。通常我不会真的介意,只是使用了 python 3.1,但 pyuic4 一直抱怨它无法导入 PyQt4 模块,因为它使用的是 python 3.2。