Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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/fir...
- 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
- I installed QT Creator/Designer 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 run:
- import PyQt5
- I am very confused with this.
- SUMMARY 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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement