-
Notifications
You must be signed in to change notification settings - Fork 590
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
[BUG-REPORT] Exception in pyinstaller bundled app for vaex >=4.6.0 #1823
Comments
Hi, thanks for sharing this. vaex/packages/vaex-core/setup.py Line 185 in 1b04e08
Does this help you? Regards, Maarten Breddels |
I'm having the same error. What you're mentioning is included in entry_points.txt but I don't know how to solve that. |
I succeeded in following the hints from pyinstaller/pyinstaller#3050 and added the following to my .spec file:
and then add the
Hope that helps |
I am using Auto py to exe GUI and facing the same issue
|
It seems Python 3.10 breaks the fix above for PyInstaller due to the new importlibs.metadata being used instead. For now however, I've fixed this for my own project by editing dataset.py and memory.py to add the code from the generated python hook and set entry_points to the hook function. utils.py may also need to be overidden in some use cases, but that didn't turn out to be needed for bare hdf5/csv access. If any hidden imports are missing after using the entry points fix above, they can be identified by using something like this:
and doing a diff between the running python version and compiled exe version, then filtering the results. Its possible simply changing the import in the hook file may fix the problem, but I haven't tested that possibility yet, as it was unclear whether the direct import of entry_points would override the hook when the module was imported a second time. Either way, combining the fix given with one of these two possibilities will yield a working app. To prevent breaking the development process, I just installed a 3.10 parallel to the development environment for the build so that it doesn't matter if the installed files are edited. EDIT: Adding for those trying to build apps relying on vaex-viz, the lazy accessors are set in init.py, applying the same monkey patch for vaex.dataframe.accessor and vaex.expression.accessor in init.py will resolve the problem. |
Based on the discussion above and looking in the related issues I have not been able to find a solution to this problem. I'm running Vaex 4.16 on python 3.10 in conda with the following basic example: `import vaex as vx vx.dataset.opener_classes = [Hdf5MemoryMapped,AmuseHdf5MemoryMapped,Hdf5MemoryMappedGadget] df = vx.open(r"c:\20220613.hdf5") |
It's been more than a year. Does anyone know the solution? Thank you in advance. |
pyinstaller -hidden-import vaex.viz --hidden-import vaex.astro.legacy --recursive-copy-metadata vaex fixed issues with Vaex 4.17 on Python 3.10 |
Description
I'm facing two exceptions when using latest vaex versions (4.6.0 and 4.7.0) after bundling using pyinstaller 4.7.
First exception
It's caused by the
VERSION
file offrozendict
(new in versions >2.0) not being bundled. That's actually a pyinstaller/frozendict issue. I just wanted to post the solution here as others will likely face the same issue. It can be solved by using the following hook file:hook-frozendict.py:
Second exception
For this one I have not found a solution yet and would like to query help. I have trouble understanding how the embedded importing in
vaex/memory.py
works (and I guess so does pyinstaller). Any hints how to solve this?Thats the concerned code section from
vaex/memory.py
Steps to reproduce are the following:
main.py:
Executing
python main.py
, the script runs fine.Bundle using pyinstaller 4.7 (having above mentioned
hook-frozendict.py
):pyinstaller --onedir --additional-hooks-dir=. main.py
Output of main.exe is:
Software information
import vaex; vaex.__version__)
: {'vaex-core': '4.7.0'}The text was updated successfully, but these errors were encountered: