mac笔记本安装brew selenium使用python环境爬虫

1. brew

参考:https://www.cnblogs.com/zoulifeng2017/p/7514139.html

Homebrew官网 http://brew.sh/index_zh-cn.html

运行命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

brew用法简要说明:

brew update  更新brew;

brew install {应用名,如git} 安装软件

brew cask install {应用名,如git} 也是下载安装,与上面的区别,请查看https://www.zhihu.com/question/22624898

更多用法请 brew help

但是在安装brew是出现错误:

remote: Counting objects: 97646, done.

remote: Compressing objects: 100% (57/57), done.

error: RPC failed; curl 56 SSLRead() return error -9806iB/s       

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

运行命令:

ruby -e "$(curl --insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

正常下载中。应该是和网络协议有关,需要添加一个insecure选项。

对应卸载命令:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

查看版本:

PeterdeMBP:test_m peteryoung$ brew -v

Homebrew 1.5.4

Homebrew/homebrew-core (git revision f51b; last commit 2018-02-23)

2.安装selenium

运行命令:brew install selenium

报错提示selenium no available

运行命令:brew install selenium-server-standalone

提示需要翻墙。


猜你喜欢

转载自blog.csdn.net/cainiao2013/article/details/79356176