ImportError: No module named PyQt4.QtCore

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

    I had the same issue when uninstalled my Python27 and re-installed it.

    I downloaded the sip-4.15.5 and PyQt-win-gpl-4.10.4 and installed/configured both of them. it still gives 'ImportError: No module named PyQt4.QtCore'. I tried to move the files/folders in Lib to make it looked 'have' but not working.

    in fact, jut download the Windows 64 bit installer for a suitable Python version (my case) from http://www.riverbankcomputing.co.uk/software/pyqt/download and installed it, will do the job.

    * March 2017 update *

    The given link says, Binary installers for Windows are no longer provided.

    See cgohlke's answer at, PyQt4 and 64-bit python.

    1. Download the .whl file at http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4.
    2. Use pip to install the downloaded .whl file.

提交回复
热议问题