ImportError: No module named PyQt4

后端 未结 5 585
悲哀的现实
悲哀的现实 2020-12-15 17:09

I installed pyqt4 by using Homebrew. But when I import PyQt4 in python interpreter, It said that \"No module named PyQt4\". Can somebody help me with that?

5条回答
  •  臣服心动
    2020-12-15 17:24

    It is likely that you are running the python executable from /usr/bin (Apple version) instead of /usr/loca/bin (Brew version)

    You can either

    a) check your PATH variable

    or

    b) run brew doctor

    or

    c) run which python

    to check if it is the case.

提交回复
热议问题