title: installing PyQt5 in Windows 7
body: <p>I wrote a program in Python 3.4 and I want to make a GUI for it. I"ve found that PyQt5 - is the tool for it.</p>
  
  <p>1) I've downloaded and installed a binary package of PyQt5 (<a href="http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.4.1/PyQt5-5.4.1-gpl-Py3.4-Qt5.4.1-x32.exe" rel="nofollow">http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.4.1/PyQt5-5.4.1-gpl-Py3.4-Qt5.4.1-x32.exe</a>).</p>
  
  <p>2) I tried to run this example code in Python:</p>
  
  <pre><code>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_())
  </code></pre>
  
  <p>Python returned en error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;frozen importlib._bootstrap&gt;", line 2218, in _find_and_load_unlocked
  AttributeError: 'module' object has no attribute '__path__'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "D:\PyQt5.py", line 2, in &lt;module&gt;
      from PyQt5.QtWidgets import QApplication, QWidget
    File "D:\PyQt5.py", line 2, in &lt;module&gt;
      from PyQt5.QtWidgets import QApplication, QWidget
  ImportError: No module named 'PyQt5.QtWidgets'; 'PyQt5' is not a package
  </code></pre>
  
  <p>3) I found an advise to install QT. So, I downloaded and installed QT (<a href="http://download.qt.io/official_releases/online_installers/qt-opensource-windows-x86-online.exe" rel="nofollow">http://download.qt.io/official_releases/online_installers/qt-opensource-windows-x86-online.exe</a>).</p>
  
  <p>4) Then I've uninstalled and installed again a binary package of PyQt5.
  No results.</p>
  
  <p>Python doesn't return any errors if I run:</p>
  
  <pre><code>import PyQt5
  </code></pre>
  
  <p>But if I try to run:</p>
  
  <pre><code>from PyQt5.QtWidgets import QApplication, QWidget
  </code></pre>
  
  <p>It returns the same error as in the beginning.</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;frozen importlib._bootstrap&gt;", line 2218, in _find_and_load_unlocked
  AttributeError: 'module' object has no attribute '__path__'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "D:\PyQt5.py", line 2, in &lt;module&gt;
      from PyQt5.QtWidgets import QApplication, QWidget
    File "D:\PyQt5.py", line 2, in &lt;module&gt;
      from PyQt5.QtWidgets import QApplication, QWidget
  ImportError: No module named 'PyQt5.QtWidgets'; 'PyQt5' is not a package
  </code></pre>
  
  <p>What am I doing wrong?</p>