Closed steveWinter closed 4 years ago
Thanks for reporting. I actually have a PyInstaller app where I did exactly what you described. Could have put a hint into the documentation – sorry for that.
Will leave this ticket open until I get to writing a section in the README.
Added a section to the README as per 1a9c4e846c623999647e6a9531fcb78310dc4029. Thank again for mentioning.
This isn't so much an issue as an FYI which could be added to the documentation to help future users.
I have need to build a Windows executable which makes use of python-fmrest (thanks :-. I'm using PyInstaller to do this for me. All goes well with the build but when attempting to run the resulting executable the error
pkg_resources.DistributionNotFound: The 'python-fmrest' distribution was not found and is required by the application
is received.For reasons which aren't entirely clear to me PyInstaller isn't able to locate the python-rest metadata and so although it knows the module is required it doesn't correctly bundle it into the built application.
To resolve this create a new folder in your project folder (e.g.
hooks
). In there create a filehook-fmrest.py
containingUpdate your
.spec
file to includehookspath=['.\\hooks'],
in the Analysis section at the top of the file (hookspath will most likely be there, but empty).If you don't have a
.spec
file already then when first callingpyinstaller
add--additional-hooks-dir=C:\\Path\\To\\Your\\hooks
to the command called.Hopefully this saves future users a couple of hours of head scratching!