ImportError: No module named PyQt4.QtCore

前端 未结 7 1022
感情败类
感情败类 2021-02-01 18:02

I\'ve reïnstalled my ssh server, so I also need to reïnstall my Python packages.

I did that, but I still get the error:

ImportError: No module named PyQt         


        
7条回答
  •  醉梦人生
    2021-02-01 18:42

    I had the "No module named PyQt4.QtCore" error and installing the python-qt4 package fixed it only partially: I could run

    from PyQt4.QtCore import SIGNAL
    

    from a python interpreter but only without activating my virtualenv.

    The only solution I've found till now to use a virtualenv is to copy the PyQt4 folder and the sip.so file into my virtualenv as explained here: Is it possible to add PyQt4/PySide packages on a Virtualenv sandbox?

提交回复
热议问题