My python script is supposed to import the following:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import *
from selenium.webdriver.common.keys import Keys
from random import uniform
from xlutils.copy import copy
import xlrd
import wx
import os
import shutil
import time
from threading import *
When I use Pyinstaller to create the EXE, the EXE does not work as it should. The python script runs perfectly.
This seems to be because Pyinstaller is not including some of the modules. The warning file that’s generated says the following is not imported:
W: no module named xlrd.XL_CELL_EMPTY (top-level import by xlutils.margins)
W: no module named pwd (top-level import by tarfile)
W: no module named xlrd.XL_CELL_TEXT (top-level import by xlutils.margins)
W: no module named readline (delayed import by pdb)
W: no module named xlrd.XL_CELL_NUMBER (top-level import by xlutils.margins)
W: no module named xlrd.open_workbook (top-level import by xlutils.margins)
W: no module named _scproxy (conditional import by urllib)
W: no module named _sysconfigdata (delayed import by distutils.sysconfig)
W: no module named pwd (delayed import by getpass)
W: no module named errorhandler (delayed import by xlutils.filter)
W: no module named EasyDialogs (conditional import by getpass)
W: no module named termios (top-level import by getpass)
W: no module named grp (top-level import by tarfile)
W: no module named xml.dom.XML_NAMESPACE (delayed import by xml.dom.pulldom)
W: no module named gestalt (delayed import by platform)
W: no module named org (top-level import by copy)
W: no module named xlrd.XL_CELL_BLANK (top-level import by xlutils.margins)
W: no module named fcntl (top-level import by tempfile)
W: no module named xml.dom.EMPTY_PREFIX (top-level import by xml.dom.minidom)
W: no module named http (top-level import by selenium.selenium)
W: no module named readline (delayed, conditional import by cmd)
W: no module named elementtree (delayed, conditional import by xlrd.xlsx)
W: no module named xlrd.open_workbook (conditional import by xlutils.margins)
W: no module named java (delayed import by platform)
W: no module named cl (delayed import by aifc)
W: no module named posix (conditional import by __main__)
W: no module named xmlparse (top-level import by pyexpat)
W: no module named posix (conditional import by pyi_os_path)
W: no module named java (conditional import by xml.sax._exceptions)
W: no module named lxml (delayed, conditional import by xlrd.xlsx)
W: no module named ElementC14N (top-level import by xml.etree.ElementTree)
W: no module named xlrd.XL_CELL_TEXT (conditional import by xlutils.margins)
W: no module named _emx_link (conditional import by os)
W: no module named posix (conditional import by os)
W: no module named xml.dom.DOMImplementation (top-level import by xml.dom.domreg)
W: no module named xmltok (top-level import by pyexpat)
W: no module named rourl2path (conditional import by urllib)
W: no module named xlrd.cellname (top-level import by xlutils.margins)
W: no module named pwd (delayed import by webbrowser)
W: no module named xml.dom.EMPTY_NAMESPACE (top-level import by xml.dom.expatbuilder)
W: no module named xml.dom.EMPTY_PREFIX (top-level import by xml.dom.expatbuilder)
W: no module named http (top-level import by selenium.webdriver.remote.remote_connection)
W: no module named SOCKS (top-level import by ftplib)
W: no module named _xmlplus (top-level import by xml)
W: no module named guppy (top-level import by xlutils.filter)
W: no module named http (top-level import by selenium.webdriver.opera.webdriver)`
Does this mean that the selenium modules are being imported? It's hard for me to pinpoint what’s wrong with exe.