Closed bnaoe closed 3 years ago
Never mind, resolved this by I copying all the missing files to the dist folder. Thanks.
which files were missing?
Best regards,
Kai
I've had the same problem. Solution is this: copy folder hl7apy to dist/main folder. Regards, Chris
Hi, I have the same doubt, pyinstaller ignores the hl7apy folder, but my solution is , if you build the executable via directory the manual solution is to copy hl7apy to the dist/main folder, not via executable.
Now for it to compile properly you have to pass flags to pyinstaller so that it tries to compile hl7apy (in my case an executable).
pyinstaller main.py -F -n="Application" -i="shadow.ico" --log-level DEBUG > out.txt --additional-hooks-dir=hooks-basicsr.py --paths=C:Users\USER\PycharmProjects\pythonProject\venvsite-packages --hidden-import hl7apy --collect-all hl7apy --clean
This was my first successful attempt to import the library. But my current hypothesis is that only the last thing I added to the command actually worked leaving the pyinstaller command with the following configuration:
pyinstaller main.py -n="Application" -i="shadow.ico" --collect-all hl7apy --clean
Indeed only --collect-all
allows the import of the library.
Regards to all
I'm importing an hl7apy module to the script it looks like it is looking for some files but not sure how to get all those. I'm attaching the code I have, it's in .ipynb but converted to .py using ipython nbconvert --to script .\Covid.ipynb then ran the command pyinstaller --debug-all .\Covid.py. The executable file gets generated however when I run the exe file it throws the error below.
Please advise. Thank you
ipynb code
command line error after running the exe file