New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pandas: C extension pandas.lib not included #1580
Comments
i should also add that the code works fine. i dont get the error when running within python im only having issues with the executable |
You probably need to create a hook for pandas. See http://pythonhosted.org/PyInstaller/#understanding-pyinstaller-hooks. The description there should still be okay for your case. |
But what file(s) should the hook point to? looks like its not complaining that it cant find the file, it looks like its complaining that a C extension file isnt built. Any ideas? |
hi i'm experiencing the same problem, got the following error during build (both --onedir and --onefile) and running the .exe 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. i tried to build with "python setup.py build_ext --inplace --force" as well as using pyinstaller 3.1.dev0, still no luck |
@jksfiftyfive It looks like pyinstaller does not bundle C extension and pandas thus complains that it was not compiled.
|
I'm also having this issue trying to use pyinstaller on centos. I don't understand which files I need to add to hook. I tried running with the |
fixed this issue on my end. Pyinstaller wasn't including `$PYTHONDIR/site-packages/pandas/lib.so`` just copied this into the dist directory and named it pandas.lib.so and it appears to be working. Pyinstaller is awesome keep up the good work! |
@dloman thanks for debugging |
@matysek Regarding your earlier comment,
I can confirm that the same issue occurs with prebuilt pandas package for anaconda on Windows 8.1 (python 2.7). Here is a minimal working example: test.py
Makefile.bat
The full build output can be found here with in particular this error:
which is strange since Edit: So, at least in anaconda on Windows, the problem is not that
Where pandas was installed with the system package manager ( Great work for the 3.0 release btw! |
@dloman thanks for your answer, works like a charm |
could this be managed with an added binaries item? As described here: |
@tallforasmurf tried modifying the spec file by adding binary / data file, but the "pandas.lib.pyd" file will be automatically placed in "dist/pandas.lib.pyd" folder instead of the root "dist" folder and that doesn't work anyone know how can I modify in the spec file so that a binary can placed in the same folder as the .exe? |
I also tried modifying the binaries section of the spec file and that didn't work. I got --onefile version working by first running |
@dloman if what you say is true, I think that if the following change to your spec file does not work,
...then there must be a bug somewhere. Because that is exactly what the binaries arg is supposed to accomplish. (Somebody double-check my syntax plz?) |
…thon-34m.so while evaluating filenames.
@jksfiftyfive @dloman or @rth could anyone of you confirm that these commits fix this issue? |
@matysek I can confirm that the above commits fixed the issue for me on Windows 8.1 with Anaconda, (Python 2.7 and 3.4), as well as on Linux (Python 2.7 and 3.4). Thanks! |
Fixed for me also (Win7, Anaconda, Python 3.4). |
Fixed for me as well 👍 |
The commits didn't work for me but the latest dev version did fix it! |
Confirmed the dev version (3.1dev0) is the winner. |
After including pandas.lib in dist folder & adding in binary in spec file.i executed the app but still same error.Should I do any build after this change? |
@MajjigaDeepak if you have any issues please create a new report with exact description technical details. |
Hi,
Im using python 2.7.9 32 bit python on windows 7.
I tried this with the development version of pyinstaller
Im getting this error when trying to run my exe. it seems to build ok, but doesnt execute. The following message appears:
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.
DataCombinerApp returned -1
I tried running, 'python setup.py build_ext --inplace' without luck.
I have found several suggestions on the web, including
3)installing pandas using pip
still get the error
Any ideas?
thanks
The text was updated successfully, but these errors were encountered: