title: exe-file created by pyinstaller, not find self-defined modules while running
body: <p>I create two python files, and the directory/file relations is as follows:</p>
  
  <pre><code>mytest---
       |---mycommon.py
       |---myMainDir---
                       |----myMain.py
  </code></pre>
  
  <p>In mycommon.py:</p>
  
  <pre><code>def myFunc(a):
      ...
  </code></pre>
  
  <p>And in myMain.py:</p>
  
  <pre><code>import sys
  sys.path.append(os.path.join(os.path.dirname(os.path.abspath('__file__')), '..'))
  import mycommon.py
  mycommon.myFunc("abc")
  </code></pre>
  
  <p>Then I created exe using pyinstaller:</p>
  
  <pre><code>pyinstall.py -F mytest\myMainDir\myMain.py
  </code></pre>
  
  <p>MyMain.exe is created, but when run, is tells that can not find <code>mycommon</code> module.</p>