Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. 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
  2.  
  3. 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
  4.  
  5. I run the following program (Python 3.6) listed here: http://zetcode.com/gui/pyqt5/fir...
  6.  
  7. import sys
  8. from PyQt5.QtWidgets import QApplication, QWidget`
  9.  
  10.  
  11. if __name__ == '__main__':
  12.  
  13. app = QApplication(sys.argv)
  14.  
  15. w = QWidget()
  16. w.resize(250, 150)
  17. w.move(300, 300)
  18. w.setWindowTitle('Simple')
  19. w.show()
  20.  
  21. sys.exit(app.exec_())
  22. 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:
  23.  
  24. from PyQt5.QtWidgets import QApplication, QWidget
  25. SystemError: initialization of QtWidgets failed without raising an exception
  26. 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):
  27.  
  28. python3 configure.py --qmake=/usr/local/Cellar/qt5/5.8.0_1/bin/qmake --sip=/usr/local/Cellar/sip/4.19.1/
  29. Then make then make install.
  30. No errors.
  31.  
  32. from PyQt5 import Qtcore Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'Qtcore' >>>
  33. 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
  34. no errors when I run:
  35.  
  36. import PyQt5
  37. I am very confused with this.
  38.  
  39. SUMMARY IN TERMINAL:
  40.  
  41. Python 3.6.0 (default, Mar 4 2017, 12:32:34)
  42. [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
  43. Type "help", "copyright", "credits" or "license" for more information.
  44. >>> from PyQt5 import QtCore, QtGui, QtWidgets
  45. Traceback (most recent call last):
  46. File "<stdin>", line 1, in <module>
  47. SystemError: initialization of QtCore failed without raising an exception
  48. >>> from PyQt5 import QtWidgets
  49. Traceback (most recent call last):
  50. File "<stdin>", line 1, in <module>
  51. SystemError: initialization of QtWidgets failed without raising an exception
  52. >>> from PyQt5 import QtGui
  53. Traceback (most recent call last):
  54. File "<stdin>", line 1, in <module>
  55. SystemError: initialization of QtGui failed without raising an exception
  56. >>> import PyQt5
  57. >>>
  58. >>>
  59. I would really appreciate any help. Thank you.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement