Comments (8)
You'll need to add numpy.distutils
(and several submodules from it) to hiddenimports
. On PyInstaller 4.3, the easiest way to do so is adding --collect-submodules numpy.distutils
to your pyinstaller command line.
from pyinstaller-hooks-contrib.
Hmm, this actually looks like a bug in our numpy
hook - it explicitly excludes numpy.distutils
(which is why as an above work-around, its collection needs to be forced manually).
from pyinstaller-hooks-contrib.
Yes. I deliberately excluded that because it was said in numpy/numpy#17184 (comment) that is was unlikely to be useful (and tbh I can't understand why astropy would need it).
from pyinstaller-hooks-contrib.
I'd rather that the odd library which does somehow depend on numpy.distutils
should --hiddenimport
it in rather that change to numpy hook to include it by default.
from pyinstaller-hooks-contrib.
It's not astropy
's fault, though - at least not directly. It's numpy.ctypeslib.load_library
(that astropy
uses to load its private extensions) that imports numpy.distutils
. But I suppose using numpy
's convenience function instead of using ctypes
directly might fall under the same argument...
from pyinstaller-hooks-contrib.
Grrr. I really like NumPy but I seriously wish it would separate its public API from its guts from its test suite from its build system...
I guess that we'll have to remove that exclusion then.
from pyinstaller-hooks-contrib.
Solved with
pyinstaller --onefile --collect-submodules numpy.distutils main.py
Thank you !
from pyinstaller-hooks-contrib.
I'm going to keep this open as it needs to be addressed in the numpy hook.
from pyinstaller-hooks-contrib.
Related Issues (20)
- Upstream removal of fake `site` module breaks TensorFlow support HOT 2
- Missing file for charset-normalizer==3.0.1 HOT 7
- Tests fails with scikit-learn 1.2.1 in openSUSE
- ModuleNotFoundError: No module named 'vtk' HOT 3
- TypeError: '>' not supported between instances of 'str' and 'int' HOT 3
- Moviepy does not work with Pyinstaller > 5.6.2 HOT 4
- PyInstaller issue with `transformers\__init__.py` file not found HOT 2
- FileNotFoundError: [WinError 2] The system cannot find the file specified: ... fastparquet.libs HOT 5
- sympy library causes maximum recursion depth exceeded with python 3.11 HOT 5
- Can't find libtorchtext.so when executing file HOT 10
- SVM module not found error HOT 2
- June release / release schedule HOT 1
- Pydantic.compiled Depreciated
- Pydantic V2 no longer containers a compile flag which results in an error during build HOT 1
- jsonschema hook is broken for jsonschema >= 4.18
- hook-rtree.py: libspatialindex is either not installed ... HOT 2
- ModuleNotFoundError: No module named 'dbus_fast._private.marshaller' HOT 1
- for python3 it is no need `prettytable` hooks HOT 2
- Missing imports during packaging with PyInstaller 5.13 and pyinstaller-hooks-contrib 2023.12 HOT 2
- ImportError: cannot import name '_pylon' from 'pypylon' after pyinstaller 6.3.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyinstaller-hooks-contrib.