title: when i run the exe i get No module named 'PyQt5' but from the script its work
body: <p>i use windows 10, python 3.7 and pyinstaller version 3.5.</p>
  
  <p>I wrote some script in pycharm and when i hit run (from the pycharm IDE) its work fine.</p>
  
  <p>but when I execute it by pyinstaller to exe ("pyinstaller --onefile design.py"),</p>
  
  <p>I click the file inside the dist folder (design.exe) and i get this error</p>
  
  <pre><code>Traceback (most recent call last):
    File "design21.py", line 10, in &lt;module&gt;
  ModuleNotFoundError: No module named 'PyQt5'
  [11116] Failed to execute script design21
  </code></pre>
  
  <p>my code start with:</p>
  
  <pre><code>    # -*- coding: utf-8 -*-
  
  # Form implementation generated from reading ui file 'gui_with_layouts.ui'
  #
  # Created by: PyQt5 UI code generator 5.13.0
  #
  # WARNING! All changes made in this file will be lost!
  
  
  from PyQt5 import QtCore, QtGui, QtWidgets
  from PyQt5.QtCore import QThread,pyqtSignal
  from style import *
  from firebase import firebase
  import xlrd
  from selenium import webdriver
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.action_chains import ActionChains
  import time
  from PyQt5.QtWidgets import *
  
  
  stop_flag = False
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I dont know how but i did the next step and somehow it work:</p>
  
  <ol>
  <li>delete line 10 and 11 (that import the 'Pyqt5')</li>
  <li>execute new exe (from cmd the commend <code>pyinstaller --onefile design21.py</code>)</li>
  <li>run the new exe file from the dist folder (Of course I got errors, because I used the moudle 'Pyqt5' without importing it).
  4.add again the import line (that lines that i deleted 10 and 11).</li>
  <li>execute again new exe (from cmd the commend <code>pyinstaller --onefile design21.py</code>)
  then when I run the new exe it work...
  no idea why but its worked.</li>
  </ol>