Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pyinstaller CMD -w problem
#1
Hello dear users, i made simple program with PyQt5 where is option to show list of WiFi. In Pycharm my program works perfectly but when i make exe. from this script, show wifi list is not working. While pyinstaller is working i see in CMD a lot of warnings like this:

Please guys how can i fix theese dll problems ? Iam trying to figure this out for more than 2 days iam done.


20525 WARNING: lib not found: LIBPQ.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\plugins\sqldrivers\qsqlpsql.dll
20817 WARNING: lib not found: Qt53DRender.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\qml\QtQuick\~-ene3d\qtquickscene3dplugin.dll
20821 WARNING: lib not found: Qt53DCore.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\qml\QtQuick\~-ene3d\qtquickscene3dplugin.dll
20838 WARNING: lib not found: Qt53DAnimation.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\qml\QtQuick\~-ene3d\qtquickscene3dplugin.dll
20841 WARNING: lib not found: Qt53DInput.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\qml\QtQuick\~-ene3d\qtquickscene3dplugin.dll
20848 WARNING: lib not found: Qt53DLogic.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\qml\QtQuick\~-ene3d\qtquickscene3dplugin.dll
20978 WARNING: lib not found: api-ms-win-core-winrt-string-l1-1-0.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\plugins\audio\qtaudio_wasapi.dll
20990 WARNING: lib not found: api-ms-win-core-winrt-l1-1-0.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\plugins\audio\qtaudio_wasapi.dll
21368 WARNING: lib not found: Qt53DRender.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\qml\QtQuick\Scene2D\qtquickscene2dplugin.dll
21371 WARNING: lib not found: Qt53DQuickScene2D.dll dependency of C:\users\samko\appdata\local\programs\python\python38-32\lib\site-packages\PyQt5\Qt\qml\QtQuick\Scene2D\qtquickscene2dplugin.dl
Reply
#2
Hello dear programmers, i have long code (better to not paste here full) made in python with PyQt5 and it is working perfectly in IDE. When i try to create exe with pyinstaller my program opens up but one of function is not working. I will paste function of button that is not working. Simply this button should get wifi and print it in widget. But in exe this is not working. Have anybody idea why ?



when i use coomand in cmd :pyinstaller --onefile -w script.py

   def getwifi(self):
       self.b2.clicked.connect(self.sethack)
       self.cb.clear()
       self.results = subprocess.check_output(["netsh", "wlan", "show", "network"])

       self.results = self.results.decode("ascii")  # needed in python 3
       self.results = self.results.replace("\r", "")
       self.ls = self.results.split("\n")
       self.ls = self.ls[4:]
       self.ssids = []
       self.x = 0
       self.y = 0
       while self.x < len(self.ls):
           if self.x % 5 == 0:
               self.ssids.append(self.ls[self.x])
           self.x += 1

       while self.y < len(self.ssids):
           self.cb.addItems([self.ssids[self.y]])
           self.y += 1
Reply
#3
Hello guys, i made program in Python with PyQt5. Now iam trying to make exe. from it with pyinstaller. The problem is-

When i make exe with this command my program opens up but some of functions like showing wifi list is not working.--> pyinstaller --onefile -w script.py

But when i exclude -w from command and CMD is opening with program then it is working.

Please guys what can be problem ? My functions in exe. depends on if i have opened CMD or not ?

pyinstaller --onefile -w script.py -> program opens but not all functions working

pyinstaller --onefile script.py -> full program working

I do not want to have opened CMD with my program.

Thank you a lot for you help !
Reply
#4
(Apr-19-2020, 07:18 PM)samuelbachorik Wrote: I do not want to have opened CMD with my program.
--noconsole look in doc.
I have help before with pyinstaller and PyQt5,but then i need working code(at least the part that has the problem and can run code) with all imports.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with Pyinstaller. No module named '_tkinter' tonynapoli2309 0 1,021 May-15-2023, 02:38 PM
Last Post: tonynapoli2309
  problem with pyinstaller to create an executable file atlass218 0 2,577 May-15-2021, 11:01 AM
Last Post: atlass218
  .py to .exe using pyinstaller problem. iNickster 3 4,491 Sep-13-2020, 08:19 PM
Last Post: snippsat
  pyinstaller Os diversion problem nadjibSoft 5 4,445 Oct-09-2018, 07:52 PM
Last Post: nadjibSoft

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020