PyQt5 - error while finding spec

眉间皱痕 提交于 2020-01-05 05:37:08

问题


I have come across many similar questions, so it appears to be a common problem. However, there are some variances among the question specifics and nothing I have found has worked for me so far. My issue is that I have installed PyQt5 and Python 3 on OS X El Capitan and that every time PyQt5 is run, I receive an error.

//anaconda/bin/python3.5: Error while finding spec for 'PyQt5.uic.pyuic' (<class 'ImportError'>: No module named 'PyQt5')

As you can see, I've been using Anaconda Continuum Analytics and that is now the default Python. Unfortunately, this obviously isn't the package which includes PyQt5:

$ which python
//anaconda/bin/python
$ which python3
//anaconda/bin/python3
$ which pyuic5
/usr/local/bin/pyuic5

I am somewhat familiar with using Python but have no experience with the PYTHONPATH environment variable or changing which version of Python is 'default' (I've got Python 3 installed, Anaconda and the stock 2.7).

How to fix this error?

来源:https://stackoverflow.com/questions/38410777/pyqt5-error-while-finding-spec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!