-
Notifications
You must be signed in to change notification settings - Fork 5
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
using pylibjpeg with executable creator libraries #55
Comments
Thanks, I'll take a look to see if I can figure out what's going on. |
I also second this issue. @scaramallion it would be great if you could provide hooks for pyinstaller as mentioned in their doc here. |
Late addition to the discussion, but have been trying to fight through packing up a PyDicom script using PyInstaller and running into the same issue. @m-aminiz's issue is likely linked to the fact that the libjpeg plugin's library package name isn't "pylibjpeg-libjpeg" but rather, it is "libjpeg". This goes for the openjpeg and rle plugins as well. I have been running into another issue PyInstaller and pylibjpeg. pylibjpeg.utils uses pkg_resources, specifically the iter_entry_points method. PyInstaller doesn't work with pkg_resources, even if you import it as a hidden import. See here for more: I have no idea what this fellow is doing and how to implement it myself so I think I'm kind of stuck unfortunately :( |
Just for reference for those that are stuck - here is what worked for me from the above links. Firstly make the spec file as usual - you do not need to use any of the command line options to get it to include pylibjpeg
or if you are making an .app file:
Then, to the my_script.spec file add this to the top before the line that starts a = Analysis(['my_script'.py],
Then to the hidden imports line change it to: hiddenimports=list(hiddenimports), and the runtime hooks line to: runtime_hooks=["./generated/pkg_resources_hook.py"], then re-run pyinstaller with
|
Hi @mshunshin , thanks very much for the solution above. As it is not clear to me that repo licenses extent to issue comments, can you confirm your intention for the above code to be included in the repository or in another with similar licensing (MIT)? |
I can confirm that any code of which I am an author, contributed within any of my submitted code or comments, and to the pydicom project can used under any licence compatible with the pydicom project licensing, specifically including the MIT license. |
Thanks @mshunshin ! |
Hi. thank you for your great library. I write a code that uses pylibjpeg. the code works pretty well. I created an executable file of my code but in the generated .exe program, pylibjpeg doesn't work and it gives me GDCM handler error. I think the problem happened because of pylibjpeg-libjpeg. for creating .exe with cx_freeze I should determine the package that used in my code in a list. when I add pylibjpeg-libjpeg to that list .exe creator code gives me error(No module named 'pylibjpeg-libjpeg'). I tried other .exe creator library like pyinstaller but the problem was same. They did not recognize pylibjpeg-libjpeg and did not add it to the .exe lib folder
The text was updated successfully, but these errors were encountered: