【问题标题】:Where brew install has pasted the path exactlybrew install 准确粘贴路径的位置
【发布时间】:2017-09-20 06:25:05
【问题描述】:

我尝试使用 splinter,它是一个基于 selenium 的网络浏览包。

最初我尝试运行并得到错误,即使我已经下载了 chromedriver。

from splinter import Browser
browser = Browser()

os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

但是我设法在brew install chromedriver 之后运行代码。 我很好奇 brew install 究竟将路径粘贴到了哪里。我查看了 .bash_profile 并没有发现任何区别。

【问题讨论】:

  • “brew install 已将路径粘贴到”是什么意思?
  • 基本上我想知道如果我从网上下载chromedriver,而不是运行brew install chromdriver
  • 请使用编辑按钮将其添加到您的问题中。

标签: macos homebrew splinter


【解决方案1】:

要找出实际文件的安装位置,请运行brew info chromedriver。在我的机器上,这给出了路径

/usr/local/Cellar/chromedriver/2.33

这不是我的$PATH,但在程序上运行type告诉我们

$ type chromedriver
chromedriver is /usr/local/bin/chromedriver

在路径中。此外,该路径是指向实际安装文件夹的符号链接,您可以像这样找到它

ls -l /usr/local/bin/chromedriver
lrwxr-xr-x  1 harald  admin  44 Nov 25 21:08 /usr/local/bin/chromedriver -> ../Cellar/chromedriver/2.33/bin/chromedriver

【讨论】:

    猜你喜欢
    • 2011-08-19
    • 2021-01-03
    • 2020-09-11
    • 1970-01-01
    • 1970-01-01
    • 2016-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多