title: pyinstaller no module named error
body: <p>first of all: python 2.7, pyinstaller 3.3.1</p>
  
  <p>I am new to pyinstaller and flask, and I am trying to develop a little app for my embedded linux system. </p>
  
  <p>The key point is that each time I generate my app with pyinstaller, it works, but when I run it, it does not. </p>
  
  <p>My last error is the following:</p>
  
  <pre><code>Traceback (most recent call last):
    File "hello.py", line 22, in &lt;module&gt;
    File "flask/app.py", line 943, in run
    File "werkzeug/serving.py", line 812, in run_simple
    File "werkzeug/_reloader.py", line 273, in run_with_reloader
    File "werkzeug/_reloader.py", line 152, in run
    File "werkzeug/_reloader.py", line 22, in _iter_module_files
    File "email/__init__.py", line 79, in __getattr__
  ImportError: No module named image
  </code></pre>
  
  <p>As far as I am concerned, I do not need this module, but to me, the most important thing is knowing where to find those hidden dependencies. What I really want to know is a method in order to look for those dependencies and change my script for generating my bunddle with pyinstaller. Till now, I use this line for generating my bunddle:</p>
  
  <p>pyinstaller --noupx --hiddenimport email.mime.message --hiddenimport image hello.py</p>
  
  <p>The second hidden import is wrong, but, how can I know which import is missing??? Where do I have to search those modules? </p>
  
  <p>My first hidden import (email.mime.message) had a similar message that just said that there was a missing import "message". I could read <a href="https://github.com/pyinstaller/pyinstaller/issues/2481" rel="nofollow noreferrer" title="here">here</a> the solution for that, but it was a matter of luck! </p>
  
  <p>How do I know from that message what is the necessary dependency??</p>
  
  <p>Thranks a lot !</p>