我在和硒一起工作。剧本在以下内容中:
C:\Users\User\Desktop\Data Analytics Arg\Proyectos\datademia\Py_install\py_ejemplo.py . Venv is activated and chromedriver.exe is in C:\Users\User\Desktop\Data Analytics Arg\Proyectos\datademia\Py_install\chromedriver.exe
剧本运行得很完美。然后我通过终端创建了一个只有..exe的文件:
pyinstaller --add-data
Python脚本(v3.6)在PyCharm中运行良好,但是当通过Auto Py转换为Exe时,在CMD中会出现以下错误。
Traceback (most recent call last):
File "export_members.py", line 2, in <module>
ModuleNotFoundError: No module named 'pymysql'
[13936] Failed to execute script export_members
如果使用pyinstaller生成可执行文件,也会给出类似的错误,有没有方法
我创建了一个批处理文件来运行Python Selenium,但是浏览器没有打开,但显示了一个错误消息 os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home 我的.ba
我观察到"DLL加载失败的错误信息,当在服务器中运行我的python文件作为exe文件时,Python或internet连接不可用。我的其他exe文件没有任何问题,这个包含IBM DB模块的文件是唯一有问题的文件。“ 我尝试了这里给出的解决方案:ImportError: DLL load failed: The specified module could not be found -- IBM DB2 -我仍然面临着麻烦。 当我在我的本地机器(笔记本电脑)上运行同样的exe文件时-它在工作,但在服务器上-它不工作。 下面是我用来转换exe文件的命令: pyinstaller -y
我有一个发送通知的python脚本,它在我的ide中运行良好,但是当我使用pyinstaller创建一个EXE时。脚本似乎不起作用,不播放任何通知。打开EXE时也没有错误,只是没有播放任何通知。另外,当im使用pyinstaller创建exe时,我确保使用--隐藏--导入pyler.platforms.win.notification。
from plyer import notification
def notifyMe(title, message):
notification.notify(
title = title,
message = mes
所以我有一个使用selenium的python脚本,当我运行它时,一切都运行得很好,但是我想把它转换成一个.exe文件,所以我使用了pyinstaller。我制作了一些规范文件,但是当我实际运行.exe时,我得到了chromedriver.exe' executable needs to be in PATH,而通常当我运行python脚本时,我得不到它 下面是我设置路径的实际python脚本的代码片段。 path = os.getcwd()
if (browser == 'c'):
driver_path = path + &
我有一个python文件,它很简单,可以从文本文件中打开网页。它应该可以工作,甚至可以在视觉工作室中工作。我决定使用pyinstaller将它转换成一个exe文件。它很好地输出了一个exe文件,我打开了它,但是它没有做任何事情,在我打开它之后就关闭了它。
我使用了Python 3,并在Anaconda中下载了pyinstaller。谢谢
我的代码:
import webbrowser
print('Welcome to my project')
webfile = open('webfile.txt', 'r')
for lines in web
我有一个名为Ringbell.py的文件和一个名为bell.mp3的mp3。前者有一行是这样写的:
import subprocess
subprocess.call(['cvlc','bell.mp3']) I also have one with full paths.
当我不使用PyInstaller时,它工作得很好,当我首先使用PyInstaller,然后删除bell.mp3 (假设它已经嵌入到py.exe文件中)时,它不能工作。我使用的是Python 3.6.8和Linux ubuntu。
pyinstaller -F --add-data
据我所知,可以将与运行在selenium上的python脚本合并或添加,使用引用@Phillip请求的这个。
下面是我的代码(Python):
# importing packages / modules
import os
import service # This module cannot be installed as it asks for Microsoft Visual C++ 14 to be isntalled on pc
from selenium import webdriver
from selenium.webdriver.chrome.options impor