Missing dll files when using pyinstaller

Question:

Good day!

I’m using python 3.5.2 with qt5, pyqt5 and sip14.8.
I’m also using the latest pyinstaller bracnch (3.3.dev0+g501ad40).

I’m trying to create an exe file for a basic hello world program.

from PyQt5 import QtWidgets
import sys

class newPingDialog(QtWidgets.QMainWindow):

def __init__(self):
    super(newPingDialog, self).__init__()
    self.setGeometry(50, 50, 500, 300)
    self.setWindowTitle("hello!")
    self.show()


app = QtWidgets.QApplication(sys.argv)
GUI = newPingDialog()
sys.exit(app.exec_())

At first, I used to get some errors regarding crt-msi. So I’ve reinstalled SDK and c++ runtime and added them to my environment.
But now I keep getting errors about missing dlls (qsvg, Qt5PrintSupport)

6296 WARNING: lib not found: Qt5Svg.dll dependency of C:usersmeappdatalocalprogramspythonpython35libsite-pac
kagesPyQt5Qtpluginsimageformatsqsvg.dll
6584 WARNING: lib not found: Qt5Svg.dll dependency of C:usersmeappdatalocalprogramspythonpython35libsite-pac
kagesPyQt5Qtpluginsiconenginesqsvgicon.dll
6992 WARNING: lib not found: Qt5PrintSupport.dll dependency of C:usersmeappdatalocalprogramspythonpython35lib
site-packagesPyQt5Qtpluginsprintsupportwindowsprintersupport.dll
7535 WARNING: lib not found: Qt5PrintSupport.dll dependency of c:usersmeappdatalocalprogramspythonpython35lib
site-packagesPyQt5QtPrintSupport.pyd
8245 INFO: Looking for eggs
8245 INFO: Using Python library c:usersmeappdatalocalprogramspythonpython35python35.dll
8246 INFO: Found binding redirects:

I’ve checked and both dlls exist and have their PATH set. I also tried to manually add them to my dist folder, but it didn’t helped.

I’ll highly appreciate any advice you might have!

Asked By: shultz

||

Answers:

This may be more like a workaround and Pyinstaller might need fixing.

I found out that --paths argument pointing to the directory containing Qt5Core.dll, Qt5Gui.dll, etc. helped

pyinstaller --paths C:Python35Libsite-packagesPyQt5Qtbin hello.py
Answered By: J.J. Hakala

Normally adding --Path argument pointing directory containing unfound library solves the problem. There might be a problem if command string parsing if you are using PyInstaller 3.3dev. This generally happens if the path contains spaces. In such case, you can modify pathex argument in .spec file generated by PyInstaller and then run it with PyInstaller to build executable.

pyinstaller file_name.spec

Hopefully, this will be fixed soon…..

Answered By: Yogesh

This has now been fixed in the latest development branch of PyInstaller, see this Issue for PyInstaller on GitHub.

Answered By: akej74

I read all complicated solutions on github and stackoverflow for this problem.
However, the below simple solution is what worked for me:

Step 1: pip3 uninstall pyinstaller

Step 2: pip install pyinstaller

Step 3: pyinstaller –onefile filename.py

I tried this solution on 2 different computers which were facing the same problem.
Both worked.
Please let me know if this works for you as well. Thumbs up would be appreciated after that.
Cheers

Answered By: Stan

26095 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:usersuserappdatalocalprogramspythonpython36-32DLLsselect.pyd

Search in C: drive for dll and set the path in pyinstaller command. The below command fixed the above pyinstaller error in windows 10:

pyinstaller --paths "C:WindowsWinSxSx86_microsoft-windows-m..namespace-downlevel_31bf3856ad364e35_10.0.17134.1_none_50c6cb8431e7428f" hello.py
Answered By: Ritesh Singh

can use “pyinstaller –onefile filename.py”. exe file will be created in dist folder

Answered By: raja yadav

I’m using Windows 10 and had to delete the data in the C:Users<username>AppDataLocalpyinstaller directory and reinstall pyinstaller for it to work.

Answered By: Martin Cronje
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.