1

I'm attempting to use pyinstaller with pandas. I wrote a very simple module:

installtest.py:

import pandas

print 'Hello!'

and then did:

pyinstaller .\installtest.py

Next I edited installtest.spec as explained in this other question, deleted the build and dist directories, and ran pyinstaller again on the edited spec:

pyinstaller .\installtest.spec

I then attempt to run the resulting exe like this:

.\dist\installtest\installtest.exe

However, I get the following error:

Traceback (most recent call last):
  File "installtest.py", line 1, in <module>
    import pandas
  File "c:\users\admini~1\appdata\local\temp\pip-build-kuazog\pyinstaller\PyInstaller\loader\pyimod03_importers.py", lin
e 389, in load_module
  File "site-packages\pandas\__init__.py", line 13, in <module>
ImportError: C extension: hashtable not built. If you want to import pandas from the source directory, you may need to r
un 'python setup.py build_ext --inplace' to build the C extensions first.
Failed to execute script installtest

It is apparently looking at site-packages\pandas__init__.py instead of anything in the dist folder. Perhaps that is part of the issue? I checked the dist folder, and it has the following pandas related files:

pandas._sparse.pyd
pandas._testing.pyd
pandas.algos.pyd
pandas.hashtable.pyd
pandas.index.pyd
pandas.json.pyd
pandas.lib.pyd
pandas.msgpack._packer.pyd
pandas.msgpack._unpacker.pyd
pandas.parser.pyd
pandas.tslib.pyd

Here is some system info:

  • Python 2.7.11 :: Continuum Analytics, Inc.

  • pandas version 0.17.0

  • pyinstaller version 3.2

  • Using Windows server 2012 R2 and Powershell

My question: how can I get this example working?

Community
  • 1
  • 1
jcrudy
  • 3,921
  • 1
  • 24
  • 31

0 Answers0