我的代码是基于硒的机器人,并且在.py中工作正常。我是编码新手,并尝试使用pyinstaller将此.py文件转换为.exe
我使用命令./pyinstaller -c -F whatsapp_bot2.py
在一个文件中创建exe
它给出了错误No module named 'selenium'[12528]
Failed to execute script whatsapp_bot2
i然后使用命令./pyinstaller whatsapp_bot2.py
来创建多文件版本
这给了同样的错误
在创建的构建文件夹中搜索后,我发现了一个警告文件,报告了错误
> This file lists modules PyInstaller was not able to find. This does
> not `necessarily mean this module is required for running you program.
> Python and`
>
> `Python 3rd-party packages include a lot of conditional or optional
> modules. For example the module 'ntpath' only exists on Windows,
> whereas the module` `'posixpath' only exists on Posix systems.`
>
> `Types if import:
> * top-level: imported at the top-level - look at these first
> * conditional: imported within an if-statement
> * delayed: imported from within a function
> * optional: imported within a try-except-statement`
>
> `IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a
> basis for
> yourself tracking down the missing module. Thanks!`
>
> `missing module named 'org.python' - imported by copy (optional),
> xml.sax (delayed, conditional) missing module named pwd - imported by
> posixpath (delayed, conditional), shutil (optional), tarfile
> (optional), http.server (delayed, optional), webbrowser (delayed),
> netrc (delayed, conditional), getpass (delayed) missing module named
> grp - imported by shutil (optional), tarfile (optional) missing module
> named termios - imported by tty (top-level), getpass (optional)
> missing module named _posixsubprocess - imported by subprocess
> (conditional) missing module named vms_lib - imported by platform
> (delayed, conditional, optional) missing module named 'java.lang' -
> imported by platform (delayed, optional), xml.sax._exceptions
> (conditional) missing module named java - imported by platform
> (delayed) missing module named _scproxy - imported by urllib.request
> (conditional) missing module named _winreg - imported by platform
> (delayed, optional) missing module named _frozen_importlib_external -
> imported by importlib._bootstrap (delayed), importlib (optional),
> importlib.abc (optional) excluded module named _frozen_importlib -
> imported by importlib (optional), importlib.abc (optional) missing
> module named readline - imported by cmd (delayed, conditional,
> optional), code (delayed, conditional, optional), pdb (delayed,
> optional) missing module named org - imported by pickle (optional)
> missing module named pynput - imported by
> C:\Users\varun\AppData\Local\Programs\Python\Python37\Scripts\whatsapp_bot2.py
> (top-level) missing module named PIL - imported by
> C:\Users\varun\AppData\Local\Programs\Python\Python37\Scripts\whatsapp_bot2.py
> (top-level) missing module named pyperclip - imported by
> C:\Users\varun\AppData\Local\Programs\Python\Python37\Scripts\whatsapp_bot2.py
> (top-level) missing module named IPython - imported by
> C:\Users\varun\AppData\Local\Programs\Python\Python37\Scripts\whatsapp_bot2.py
> (top-level) missing module named cv - imported by
> C:\Users\varun\AppData\Local\Programs\Python\Python37\Scripts\whatsapp_bot2.py
> (top-level) missing module named cv2 - imported by
> C:\Users\varun\AppData\Local\Programs\Python\Python37\Scripts\whatsapp_bot2.py
> (top-level) missing module named posix - imported by os (conditional,
> optional) missing module named resource - imported by posix
> (top-level) missing module named selenium - imported by
> C:\Users\varun\AppData\Local\Programs\Python\Python37\Scripts\whatsapp_bot2.py
> (top-level)`
请问我是编程新手,不是很了解。所以请帮我解决这个问题