I'm using pyinstaller to build a standalone executable. Pyinstaller successfully makes the executable, but when I run the .exe I get the following error:
ImportError: C extension: 'lib' 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.
In my attempts to solve the problem, I went looking for a 'setup.py' file in C:\Python34\Lib\site-packages\pandas, but did not find one there. I also uninstalled pandas using pip, then reinstalled from the .whl file from www.lfd.uci.edu/~gohlke/pythonlibs/. I also googled the error, and found someone who seemed to have a similar problem here. In that case, the problem was solved by running 'python setup.py build_ext --inplace --force' but again, I can't find setup.py in the pandas directory. I also found a suggestion to "just use Linux" but that is not an option since this is for work. I also tried building the executable using py2exe and cx_freeze, but neither of those worked.
I'm using Python 3.4 under Windows 7, and the program runs correctly when I run it from inside PyCharm. How do I get a working standalone .exe?
Edit:
After to building the executable with py2exe and running it, the error I get is:
ImportError: (DLL load failed: the specified module could not be found.) 'C:\Users\aarjad\PycharmProjects\MyProgram\dist\scipi.special._ufuncs.pyd')
However, 'scipi.special._ufuncs.pyd' is right there in that folder, so I don't know what could be going on there.
After building the executable with cx_freeze and running it, the error I get is:
ImportError: Error importing scipi: you cannot import scipi while being in the scipi source directory; please exit teh scipy source tree first, then relaunch your python interpreter.
This problem was solved by porting the lowess function from the statsmodels package from cython to python, thus removing the need to import the statsmodels package, which is what pyinstaller was choking on.