title: How can I "compile" scripts using the Pandas module with pyinstaller?
body: <p>I am trying to create an executable from a Python script that uses Pandas using pyinstaller 2.0.</p>
  
  <p>I have a very simple test script ('hello.py'):</p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame([1, 2, 3])
  print df.mean()
  </code></pre>
  
  <p>Pyinstaller seems to run fine, other than a few warnings:</p>
  
  <pre><code>PS C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0&gt; python .\pyinstaller.py .\hello.py
  39 INFO: wrote C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\hello.spec
  61 INFO: Testing for ability to set icons, version resources...
  67 INFO: ... resource update available
  68 INFO: UPX is not available.
  1468 WARNING: library python%s%s required via ctypes not found
  1525 INFO: checking Analysis
  1548 INFO: building because C:\Python27_32\lib\site-packages\pandas\util\decorators.pyc changed
  1548 INFO: running Analysis out00-Analysis.toc
  1549 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
  2058 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...
  2059 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91.manifest
  2061 INFO: Searching for file msvcr90.dll
  2061 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcr90.dll
  2061 INFO: Searching for file msvcp90.dll
  2062 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcp90.dll
  2062 INFO: Searching for file msvcm90.dll
  2062 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcm90.dll
  2152 INFO: Analyzing C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\support\_pyi_bootstrap.py
  3495 WARNING: library python%s%s required via ctypes not found
  3537 INFO: Analyzing C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\PyInstaller\loader\archive.py
  3685 INFO: Analyzing C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\PyInstaller\loader\carchive.py
  3831 INFO: Analyzing C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\PyInstaller\loader\iu.py
  3854 INFO: Analyzing .\hello.py
  4884 INFO: checking Tree
  4930 INFO: checking Tree
  6183 WARNING: pythoncom is changing its name to pythoncom27
  6206 WARNING: pywintypes is changing its name to pywintypes27
  C:\Python27_32\lib\site-packages\matplotlib\backends\backend_qt.py:11: MatplotlibDeprecationWarning: QT3-based backends are deprecated and will be removed after the v1.2.x release. Use the equivalent QT4 backend instead.
    mplDeprecation)
  17446 INFO: Hidden import 'encodings' has been found otherwise
  17446 INFO: Looking for run-time hooks
  17448 INFO: Analyzing rthook C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\support/rthooks/pyi_rth_Tkinter.py
  17572 INFO: Analyzing rthook C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\support/rthooks/pyi_rth_mpldata.py
  17697 INFO: Analyzing rthook C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\support/rthooks/pyi_rth_encodings.py
  17819 INFO: Analyzing rthook C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\support/rthooks/pyi_rth_versioneddll.py
  17955 INFO: Analyzing rthook C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\support/rthooks/pyi_rth_win32comgenpy.py
  18098 INFO: Analyzing rthook C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\support/rthooks/pyi_rth_versioneddll.py
  19493 INFO: Adding Microsoft.VC90.MFC to dependent assemblies of final executable
  19554 INFO: Searching for assembly x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8_none ...
  19555 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_b81d038aaf540e86.manifest
  19560 INFO: Searching for file mfc90.dll
  19561 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_b81d038aaf540e86\mfc90.dll
  19562 INFO: Searching for file mfc90u.dll
  19562 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_b81d038aaf540e86\mfc90u.dll
  19562 INFO: Searching for file mfcm90.dll
  19562 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_b81d038aaf540e86\mfcm90.dll
  19562 INFO: Searching for file mfcm90u.dll
  19562 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_b81d038aaf540e86\mfcm90u.dll## Heading ##
  20465 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  20723 INFO: C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\build\pyi.win32\hello\out00-Analysis.toc no change!
  20749 INFO: checking PYZ
  20808 INFO: checking PKG
  20809 INFO: building because C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\build\pyi.win32\hello\hello.exe.manifest changed
  20810 INFO: building PKG out00-PKG.pkg
  20838 INFO: checking EXE
  20838 INFO: rebuilding out00-EXE.toc because pkg is more recent
  20838 INFO: building EXE from out00-EXE.toc
  20844 INFO: Appending archive to EXE C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\build\pyi.win32\hello\hello.exe
  20854 INFO: checking COLLECT
  WARNING: The output directory "C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\dist\hello" and ALL ITS CONTENTS will
  be REMOVED! Continue? (y/n)y
  23423 INFO: Removing dir C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\dist\hello
  23703 INFO: building COLLECT out00-COLLECT.toc
  </code></pre>
  
  <p>But when I try to run the executable, I am greeted with an import error:</p>
  
  <pre><code>PS C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\dist&gt; .\hello.exe
  cannot import name hashtable
  Traceback (most recent call last):
    File "&lt;string&gt;", line 2, in &lt;module&gt;
    File "C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in importHook
      mod = _self_doimport(nm, ctx, fqname)
    File "C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in doimport
      exec co in mod.__dict__
    File "C:\Users\&lt;user&gt;\Dropbox\pyinstaller-2.0\hello\build\pyi.win32\hello\out00-PYZ.pyz\pandas", line 6, in &lt;module&gt;
  ImportError: cannot import name hashtable
  </code></pre>
  
  <p>Any idea how I can fix this?  I'm on Windows 8 using Python 2.7.5.  I tried using the Pandas binaries from Gohlke's site as well as using pip install (some other thread suggested that pip install was the way to solve the hashtable error).  I saw the same error.</p>
  
  <p>For reference, I'm able to get pyinstaller to work using other scripts that don't use Pandas.</p>
  
  <p>I am also able to get Pandas to compile into an executable using py2exe, but I'd like one executable file, and for some reason the py2exe executable takes forever to run (> 5 seconds for that simple script).</p>