-
Notifications
You must be signed in to change notification settings - Fork 74
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
PyInstaller: ModuleNotFoundError: No module named 'mdf3reader' #120
Comments
mdfreader has an obfuscated import system. Perhaps pyinstaller would succed if #91 would be implemented. |
Intention was not to obfuscate import system but improve robustness of import process and support people having issues with it by introducing absolute path import. But this is not recommended way of doing indeed, which might cause the issue you are facing with pyinstaller. |
If absolute path imports are needed for command line functionality, maybe it would be better to add a specific command line frontend? Something for the future. |
Can you detail about this command line frontend ? |
import sys
from pprint import pprint
pprint(sys.path)
import mdfreader
pprint(sys.path) |
I thought that the sys.path appends were due to some issues with calling the module from the command line. Maybe i misunderstood. |
Absolute path is rather coming from #41 Let's call it youth mistake. |
Hi. Yes it seems to be working better now. Thanks! |
I am trying to package my application with pyinstaller. But when executing the .exe file I get the following errors:
Traceback (most recent call last):
File "site-packages\mdfreader_init_.py", line 28, in
File "c:\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.dict)
File "site-packages\mdfreader\mdfreader.py", line 48, in
ModuleNotFoundError: No module named 'mdf3reader'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "drivers_notes.py", line 8, in
from mdfreader import mdf
File "c:\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.dict)
File "site-packages\mdfreader_init_.py", line 30, in
ImportError: cannot import name 'mdfinfo'
[5568] Failed to execute script drivers_notes
I have been trying via the pyinstaller support pages to find a way to solve this but I am just too much of a newbie when it comes to python, modules and dependencies. Giving it one last try here in case anyone else has any experience with mdfreader and pyinstaller.
The text was updated successfully, but these errors were encountered: