8000 Error creating Executable with Pandas · Issue #15711 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Error creating Executable with Pandas #15711

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

Closed
SiMar55 opened this issue Mar 5, 2020 · 3 comments
Closed

Error creating Executable with Pandas #15711

SiMar55 opened this issue Mar 5, 2020 · 3 comments
Labels
31 - Third-party binaries Install/import issues other than Anaconda-specific 33 - Question Question about NumPy usage or development 50 - Duplicate

Comments

@SiMar55
Copy link
SiMar55 commented Mar 5, 2020

My code works fine. It runs no issue when I run it through PyCharm (Python interpreter). I tried creating an executable of the program using a batch file. I have successfully created many executables using batch files, this is the first program not to work and the first program to use pandas.

Reproducing code example:

Batch file:
C:\Python38\Scripts\pyinstaller.exe ^
--hidden-import numpy ^
--hidden-import pandas ^
--hidden-import pandastable ^
--onefile ^
--distpath C:\Python38\Programs ^
--specpath C:\Python38\Programs\specs ^
--workpath C:\Python38\Programs\build ^
H:\Python#####\Update.py


<!-- Remove these sections for a feature request -->

### Error message:

Traceback (most recent call last):
  File "\\W16-CE-DC2\Users$\#####\Python\#####\Update.py", line 3, in <module>
    import pandas
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pandas\__init__.py", line 16, in <module>
ImportError: Unable to import required dependencies:
numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Python38\Programs\Update.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.1" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

[120588] Failed to execute script Update

### Numpy/Python version information:

<!-- Output from 'import sys, numpy; print(numpy.__version__, sys.version)' -->
Numpy : 1.18.1        Python: 3.8.0

@seberg
Copy link
Member
seberg commented Mar 5, 2020

Can you see if other issues mentioniong PyInstaller, such as #15299 help you? There was an issue with python 3.8 there, there are also some issues around PyInstaller picking up all the modules it needs to include correctly, due to its mechanism to do so being a brittle for NumPy.

@seberg seberg added 33 - Question Question about NumPy usage or development 50 - Duplicate 31 - Third-party binaries Install/import issues other than Anaconda-specific labels Mar 5, 2020
@SiMar55
Copy link
Author
SiMar55 commented Mar 5, 2020

I solved the issue. I had to downgrade to Python 3.7.6, re-download pyinstaller, and download all the modules again. Then the executable worked.
I wonder if there are still some bugs with Python 3.8

@seberg
Copy link
Member
seberg commented Mar 5, 2020

Thanks for the followup, closing, it seems like it is identical to gh-15229 anyway then.

@seberg seberg closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
31 - Third-party binaries Install/import issues other than Anaconda-specific 33 - Question Question about NumPy usage or development 50 - Duplicate
Projects
None yet
Development

No branches or pull requests

2 participants
0