title: Pyinstaller import error no module named path
body: <p>I am trying to build a program in python that uses a lot of different modules.When i run it normally (from cmd) everything works fine, but when i try to create an executable doesnt work. I have tried using py2exe and pyinstaller,tried googling the problem for a couple of hours but nothing really works. I am getting this when i run the exe from cmd. I have tried manually importing the necessary modules but still didnt work.  Any ideas?</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;string&gt;", line 35, in &lt;module&gt;
  
  File "site-packages\pyttsx\__init__.py", line 39, in init
  
    File "site-packages\pyttsx\engine.py", line 45, in __init__
  
    File "site-packages\pyttsx\driver.py", line 66, in __init__
  
    File "site-packages\pyttsx\drivers\sapi5.py", line 37, in buildDriver
  
    File "site-packages\pyttsx\drivers\sapi5.py", line 46, in __init__
  
    File "site-packages\win32com\client\__init__.py", line 309, in WithEvents
  
    File "site-packages\win32com\client\gencache.py", line 524, in EnsureModule
  
    File "site-packages\win32com\client\gencache.py", line 291, in 
  MakeModuleForTypelib
  
    File "site-packages\win32com\client\makepy.py", line 286, in 
  GenerateFromTypeLibSpec
  
    File "site-packages\win32com\client\gencache.py", line 554, in 
  AddModuleToCache
  
    File "site-packages\win32com\client\gencache.py", line 633, in _GetModule
  
    File "c:\users\giorgo~1\appdata\local\temp\tmppddzle\gen_py\C866CA3A-32F7-
  11D2-9602-00C04F8EE628x0x5x4.py", line 10, in &lt;module&gt;
  
      import win32com.client.CLSIDToClass, pythoncom, pywintypes
  
    File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 
  line 158, in load_module
  
      return self._importer.load_module(fullname, self._fullname)
  
  
    File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 
  line 389, in load_module
  
      exec(bytecode, module.__dict__)
  
    File "site-packages\pythoncom.py", line 2, in &lt;module&gt;
  
    File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 
  line 158, in load_module
  
      return self._importer.load_module(fullname, self._fullname)
  
    File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 
  line 389, in load_module
  
      exec(bytecode, module.__dict__)
  
    File "site-packages\win32\lib\pywintypes.py", line 2, in &lt;module&gt;
  
  
  
    File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 
  line 158, in load_module
  
      return self._importer.load_module(fullname, self._fullname)
  
    File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", 
  line 389, in load_module
  
      exec(bytecode, module.__dict__)
  
    File "os.py", line 120, in &lt;module&gt;
  
  ImportError: No module named path
  
  alltogether returned -1
  </code></pre>