Mac下
brew cask install chromedriver
brew install phantomjs
安装geckodriver
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1540, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'
需要安装Mac下可以执行:
brew install geckodriver
安装MongoDB
brew install mongodb
启动MongoDB(有两种方式)
方式一:从上面的安装提示中可以看到启动MongoDB的方法:
mongod --config /usr/local/etc/mongod.conf
mongod.conf的内容是关于MongoDB的设置
systemLog://log 目录
destination: file
path: /usr/local/var/log/mongodb/mongo.log logAppend: true
storage://db目录
dbPath: /usr/local/var/mongodb net://网络地址 bindIp: 127.0.0.1
方式二:
brew services start mongodb
使用MongoDB
首先需要连接到MongoDB service:
mongo