ImportError: No module named PyQt4.QtCore

前端 未结 7 1024
感情败类
感情败类 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!

提交回复
热议问题