问题
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