Python PyQt on macOS Sierra

前端 未结 6 1333
忘了有多久
忘了有多久 2020-12-08 15:18

How can I get to work PyQt 4 or 5 on a Mac with OS X Sierra? It seems that I have to wait for a new version of PyQt but I am not sure if that is actually true.

6条回答
  •  再見小時候
    2020-12-08 15:48

    If you still get the import error, you should also add

    PYTHONPATH="${PYTHONPATH}:/usr/local/lib/python2.7/site-packages/"
    export PYTHONPATH
    

    to your ~/.bash_profile file after you applied the above stated steps, then it should work fine (make sure that PyQt4 is installed in that folder). I have installed python with conda and this import error seems to be related to anaconda.

提交回复
热议问题