python compiler

Asked

Viewed 215 times

-3

Good afternoon, I am developing a virtual assistant in python, which by voice command is possible to do some things. When the script in Pycharm or the same works smoothly, when running cmd on Windows also does not work properly, but when the script is installed by pyinstaller, the program is successfully compiled, but the exe file is open or the console opens again. Could someone help me ???

The mistake is this one:

(venv) C: Users Lina Pycharmprojects uncapcth build exe.win-amd64-3. 7>time.exe Traceback (Most recent call last): File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages cx_Freeze initscripts__startup__.py", line 40, in run module.run() File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages cx_Freeze initscripts Console.py", line 37, in run exec(code, {'name': 'main'}) File "time.py", line 1, in File "C: Users Lina Pycharmprojects uncapcth Wizard.py", line 3, in from webbot import Browser File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages webbot__init__.py", line 1, in from . webbot import Browser File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages webbot.py", line 1, in from Selenium import webdriver ; File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages Selenium webdriver__init__.py", line 18, in from .firefox.webdriver import Webdriver as Firefox # noqa File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages Selenium webdriver firefox webdriver.py", line 29, in from Selenium.webdriver.remote.webdriver import Webdriver as Remotewebdriver File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages Selenium webdriver remote webdriver.py", line 27, in from . remote_connection import Remoteconnection File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages Selenium webdriver remote remote_connection.py", line 24, in import urllib3 File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages urllib3__init__.py", line 7, in from . connectionpool import Httpconnectionpool, Httpsconnectionpool, connection_from_url File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages urllib3 connectionpool.py", line 28, in from .packages.Six.moves import File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages urllib3 Packages Six.py", line 91, in get result = self. _resolve() File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages urllib3 Packages Six.py", line 113, in _resolve Return _import_module(self.mod) File "C: Users Lina Appdata Local Programs Python Python37 lib site-Packages urllib3 Packages Six.py", line 82, in _import_module import(name) Modulenotfounderror: No module named 'What'

The libraries used are: pyaudio, speech_recognition, webbot, pyautogui, pyttsx3

1 answer

1


If you want to convert your script to the extension .exe without the console, you can install a library called auto-py-to-exe, which allows you to convert the code into a single executable file and with custom icon. Simply open the command prompt as administrator and type pip install auto-py-to-exe or pip3 install auto-py-to-exe (if you are using Python 3). After the installation, open the cmd and type auto-py-to-exe, it will open a window so that you can select the file .py (your script) to be converted, in addition to the possibility to add an icon to your program, type the name, convert to a single file, hide the console (is your case, is the "Hide console" option), and choose the file’s destination folder. Thus it is possible to generate the executable program and without the console!

  • 1

    Thanks a lot man, helped a lot !!! , I still had to solve a problem with one of the libraries , but I work !! Thanks

  • 1

    Nothing expensive, success in your career!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.