Using PyInstaller to create a .exe of a script but I get the following error

22 Views Asked by At

This is what I used:

pyinstaller --windowed --onefile --upx-dir C:\Users\23445423\Documents\Workspace\Tool_1_0\upx\upx-4.2.2-win64\upx-4.2.2-win64" ToolScript.py

Traceback (most recent call last):
  File "ToolScript.py", line 4, in <module>
    from matplotlib.backends.backend_pdf import PdfPages
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "matplotlib\__init__.py", line 156, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "matplotlib\rcsetup.py", line 27, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "matplotlib\colors.py", line 56, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "matplotlib\scale.py", line 22, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "matplotlib\ticker.py", line 138, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "matplotlib\transforms.py", line 49, in <module>
ImportError: DLL load failed while importing _path: The specified module could not be found.



Not sure where to go from here or How to debug this. I got the impression it was cause matplotlib wasnt installed but it is. Do I need to add a specific command to import PDFpages?

Its script that when I call in a batch file with arguments it works perfectly fine, but then I create the .exe version of it, it doesnt work.

0

There are 0 best solutions below