Search code examples
pythonpandaspy2exesetuptools

Pandas with py2exe: ImportError: C extension: dist not built


Trying to build a py2exe (0.6.9) package, the module has a dependency that uses pandas (0.16.2).

When "py2exe'ing", no errors are shown and the pandas python package is within the py2exe package.

When trying to run the .exe, it fails with:

File "pandas__init__.pyo", line 13, in

ImportError: C extension: dist not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.

I tried building pandas with that suggested command option, and then built a wheel from it, but didn't change the result.

What else could I be missing?


Solution

  • Update: This is not a fix to the problem, but if for anyone is also possible, I can confirm that changing to PyInstaller was a workaround.