May 03, 2020 · Use PyInstaller --hidden-import=pkg_resources.py2_warn my_script.py to fix this. Same applies to most ModuleNotFoundErrors.. That hidden module was added in setuptools version 45.0.0 and removed in 49.0.0 so either downgrading below or upgrading above will also fix it.
Mar 27, 2017 · Unfortunately there are not a lot of good examples on pyinstaller. Lessons: pip, pyinstaller, python were not talking to the same python version (so I unanimously made everything python3) missing packages; missing path (importing code from sub folders, I had used sys_path and all and it dint work with pyinstaller).
Listing Hidden Imports¶ If Analysis thinks it has found all the imports, but the app fails with an import error, the problem is a hidden import; that is, an import that is not visible to the analysis phase. Hidden imports can occur when the code is using __import__(), importlib.import_module() or perhaps exec() or eval().
17.10.2018 · pyinstaller --hidden-import babel.numbers main.py This does not fix the problem. I don't know what has changed, but it is no-longer possible to workaround this.
The pyinstaller process completes and produces the dist folder with the executable as expected. However, when I run the .exe I get module import errors related ...
Oct 19, 2015 · I was getting a 'win32timezone' module not found, when a FileChooser would try to open in my .exe build (no problems in the same program running as 'python main.py'). Turns out the hidden-import mentioned below was the correct thing to fix it.
Jul 26, 2019 · Even if you have toml installed, pyinstaller will not find the hidden import because you are passing the config flags after your script name, instead of before, so the command executes up until your script name and disregards the rest. Try: pyinstaller --hidden-import toml --onefile --clean --name myApp main.py.
In the bad case, when I have dynamic import, I add --hiddenimport flag, PyInstaller run detects all submodules (again, with the hook) but will not detect ...
If Analysis thinks it has found all the imports, but the app fails with an import error, the problem is a hidden import; that is, an import that is not visible ...
PyInstaller bundles a Python application and all its dependencies into a single package. The user can It can build graphical windowed apps (apps that do not ...
--hidden-import MODULENAME, ... Optional module or package (the Python name, not the path name) that will be ignored (as though it was not found). This option can be used multiple times. ... (If you do not specify an icon file, PyInstaller supplies a file icon-windowed.icns with the PyInstaller logo.)
If Analysis thinks it has found all the imports, but the app fails with an import error, the problem is a hidden import; that is, an import that is not visible to the analysis phase. Hidden imports can occur when the code is using __import__() , importlib.import_module() or perhaps exec() or eval() .
27.03.2017 · PyInstaller doesn't import libraries requested by other library. If I run my code with python3 my_code.py everything is ok, but, if I previously packaged my program, when I launch the executable some libraries are missing. If I re-instal...
but when I run the executable it gave me: ModuleNotFoundError: No module named 'toml'. So I tried this: pyinstaller main.py --hidden-import toml --onefile ...