python代码用pyinstaller打包后的exe文件,运行出现异常报错,如何解决

在以下的python代码中导入并运用了selenium,通过pyinstaller -F命令打包好exe程序,在其他电脑上无法正常运行,出现异常,请问如何解决?

from selenium.webdriver import Chrome
import time

web=Chrome()
web.get("https:www.baidu.com")
print(web.title)
time.sleep(10)

报错提示如图中的selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

img

seleium运行时报错:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
1、首先看是否未下载chrome相应驱动
下载驱动:
下载chrome浏览器相应版本的驱动。在百度中搜索chrome driver;
本机上将驱动放到一个路径下,并将该路径添加到环境变量的path中。
如在E盘下新建drivers目录,将下载的驱动chromedriver.exe放到drivers目录下。然后将E:\drivers添加到系统变量path中。
2、如驱动已经下载,且已添加环境变量,依然报错,解决方法:直接把hromedriver.exe文件放在python的项目目录下,即D:\python根目录下,重新执行

你打包的时候没把chrome一起打包吧?