ImportError: No module named PyQt4.QtCore

前端 未结 7 1019
感情败类
感情败类 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:55

    I was having the same error - ImportError: No module named PyQt4.QtGui. Instead of running your python file (which uses PyQt) on the terminal as -

    python file_name.py
    

    Run it with sudo privileges -

    sudo python file_name.py
    

    This worked for me!

    0 讨论(0)
提交回复
热议问题