Giter Club home page Giter Club logo

Comments (8)

rokm avatar rokm commented on June 14, 2024

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.

rokm avatar rokm commented on June 14, 2024

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.

bwoodsend avatar bwoodsend commented on June 14, 2024

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.

bwoodsend avatar bwoodsend commented on June 14, 2024

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.

rokm avatar rokm commented on June 14, 2024

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.

bwoodsend avatar bwoodsend commented on June 14, 2024

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.

jglorian avatar jglorian commented on June 14, 2024

Solved with

pyinstaller --onefile --collect-submodules numpy.distutils main.py

Thank you !

from pyinstaller-hooks-contrib.

bwoodsend avatar bwoodsend commented on June 14, 2024

I'm going to keep this open as it needs to be addressed in the numpy hook.

from pyinstaller-hooks-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.