我已经重新安装了我的 ssh 服务器,所以我还需要重新安装我的 Python 包。
我这样做了,但我仍然收到错误:
ImportError: No module named PyQt4.QtCore
我已经安装成功了:
sudo apt-get install libqt4-dev
但是还是不行,所以我尝试安装instruction of PyQt4
所以我尝试先安装 SIP,但是当我运行“make”时 (see end of this page, "Building")
但我收到此错误:
make[1]: Entering directory `/home/francis/Downloads/sip-4.12.4/sipgen'
g++ -o sip main.o transform.o gencode.o extracts.o export.o heap.o parser.o lexer.o
make[1]: g++: Command not found
make[1]: *** [sip] Error 127
make[1]: Leaving directory `/home/francis/Downloads/sip-4.12.4/sipgen'
make: *** [all] Error 2
我该怎么办?还是有其他方法安装 PyQt4?
谢谢!
最佳答案
正如评论中提到的,您需要安装 python-qt4
包 - 无需自己重新编译。
sudo apt-get install python-qt4
关于python - ImportError : No module named PyQt4. QtCore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7119844/