无法安装Selenium Python

时间:2018-04-17 03:36:55

标签: python selenium

我是新手编码我试图安装Selenium for python我试图在我的Mac终端上使用这个命令sudo pip install -U selenium 然后我收到了这条消息

The directory '/Users/ag/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/ag/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting selenium
  Could not fetch URL https://pypi.python.org/simple/selenium/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
  Could not find a version that satisfies the requirement selenium (from versions: )
No matching distribution found for selenium

如果有人能帮助我,我将不胜感激

谢谢。

1 个答案:

答案 0 :(得分:-1)

我之前没有使用过selenium,但我认为它适用于您的计算机。 试试这个,

$sudo pip install selenium

$sudo easy_install selenium

$sudo brew install selenium