Skip to content
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

Building with pandas stops executable without any response #5589

Closed
4 of 6 tasks
timptner opened this issue Feb 25, 2021 · 3 comments
Closed
4 of 6 tasks

Building with pandas stops executable without any response #5589

timptner opened this issue Feb 25, 2021 · 3 comments

Comments

@timptner
Copy link

timptner commented Feb 25, 2021

Description of the issue

When building an executable the build process completes successfully but when running the generated .exe-file no error appears and the script stops.

I'm not sure if this should be reported to pandas but since this code runs fine as normal python process I think it's a bug of pyinstaller.

Context information (for bug reports)

  • Output of pyinstaller --version: 4.2
  • Version of Pandas: 1.1.5
  • Version of Python: 3.6
  • Platform: Windows (german language), conda,
  • Did you also try this on another platform? Does it work there?

Did not test on different plattform.

  • try the latest development version, using the following command:
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

Make sure everything is packaged correctly

  • start with clean installation
  • use the latest development version
  • Run your frozen program from a command window (shell) — instead of double-clicking on it
  • Package your program in --onedir mode
  • Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
  • Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

A minimal example program which shows the error

import pandas as pd

def main():
    print(pd.__version__)

if __name__ == '__main__':
    main()

Stacktrace / full error message

No error message / stracktrace

@bwoodsend
Copy link
Member

Try with the development version of PyInstaller. That looks like the Conda/NumPy issue that was fixed in #5168.

conda uninstall pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
pyinstaller --clean your-code.py

@timptner
Copy link
Author

timptner commented Feb 25, 2021

Tested pyinstaller (4.2) with pandas (1.2.2) and python version 3.9.1 under mac+venv/pip:

Traceback (most recent call last):
    File "test.py", line 1, in <module>
        import pandas as pd
    File "PyInstaller/loader/pyimod03_importers.py", line 531, in exec_module
    File "pandas/__init__.py", line 179, in <module>
    File "PyInstaller/loader/pyimod03_importers.py", line 531, in exec_module
    File "pandas/testing.py", line 5, in <module>
    File "PyInstaller/loader/pyimod03_importers.py", line 531, in exec_module
    File "pandas/_testing.py", line 29, in <module>
    File "pandas/_libs/testing.pyx", line 1, in init pandas._libs.testing
ModuleNotFoundError: No module named 'cmath'
[18120] Failed to execute script test

Same error when building with pyinstaller 5.0.dev0. Gets fixed by adding --hidden-import=cmath.

I'll try using pyinstaller version 5.0.dev0 under windows+conda in the next days. Also try adding cmath as hidden import if the development version is not helping.

@timptner
Copy link
Author

timptner commented Mar 1, 2021

@bwoodsend Using PyInstaller 5.0.dev0 fixed it! Thx

@timptner timptner closed this as completed Mar 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants