Paths:
echo $PATH: /usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/me/.rvm/bin
PYTHON PATH: /usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6
/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/site-packages
I run the following program (Python 3.6) listed here:
http://zetcode.com/gui/pyqt5/firstprograms/
import sys
from PyQt5.QtWidgets import QApplication, QWidget`
if __name__ == '__main__':
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
and continue to receive errors. I moved a few folders around after some other errors but things should be working now. I receive the following error:
from PyQt5.QtWidgets import QApplication, QWidget
SystemError: initialization of QtWidgets failed without raising an exception
What I have tried:
I installed QT but also installed PyQt5 and Sip Via Homebrew and Pip. Updated to the most recent versions of both, ran the -qmake and make install commands- took about 30 min. Typed this in the terminal (Mac):
python3 configure.py --qmake=/usr/local/Cellar/qt5/5.8.0_1/bin/qmake --sip=/usr/local/Cellar/sip/4.19.1/
Then make then make install.
No errors.
from PyQt5 import Qtcore Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'Qtcore' >>>
from PyQt5.QtWidgets import QApplication, QWidget Traceback (most recent call last): File "<stdin>", line 1, in <module> SystemError: initialization of QtWidgets failed without raising an exception
no errors when I
import PyQt5
SUMMARY OF WHEN RAN IN TERMINAL:
Python 3.6.0 (default, Mar 4 2017, 12:32:34)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtCore, QtGui, QtWidgets
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: initialization of QtCore failed without raising an exception
>>> from PyQt5 import QtWidgets
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: initialization of QtWidgets failed without raising an exception
>>> from PyQt5 import QtGui
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: initialization of QtGui failed without raising an exception
>>> import PyQt5
>>>
>>>
I would really appreciate any help. Thank you.