安装PyQt4找不到-lpython3.1mu

发布于 2024-11-29 02:45:48 字数 752 浏览 0 评论 0原文

最近我将 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。

recently I upgraded my Ubuntu from 10.04 to 11.04. Now I'm having trouble installing PyQt4 for python 3.2. It worked fine for 3.1. When I do sudo make install after a while I get following error:

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

It's really strange I googled for hours and didn't find any solution. Normally I wouldn't really mind it and just used python 3.1 but pyuic4 keeps complaining that it cannot import PyQt4 module because it's using python 3.2.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉世弥音 2024-12-06 02:45:48

您需要从 apt 存储库安装 python3-dev 软件包,为了安全起见,我会运行以下命令 sudo apt-get update ,因为新的软件包列表永远不会出错:)。然后安装 sudo apt-get install python3.1-dev python3.2-dev python3-dev 你实际上只需要 python3.1-dev,但是安装 python3.2-dev< /code> 和 python3-dev 也不会真正造成伤害

You need to install the python3-dev packages from apt repos, just to be safe i would run the following commands sudo apt-get update, because you can never go wrong with a fresh package listing :). and then to install sudo apt-get install python3.1-dev python3.2-dev python3-dev you really only need python3.1-dev, but installing python3.2-dev and python3-dev can't really hurt either

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文