[mac笔记]Mac搭建python+selenium环境

来源:互联网 发布:永恒之塔3.0数据库 编辑:程序博客网 时间:2024/05/17 08:28

参考链接http://blog.csdn.net/kacylining/article/details/60587484

1下载pip-9.0.1

-解压后保存位位置/usr/local/pip-9.0.1/
-cd到这个目录 sudo python setup.py install

creating distcreating 'dist/pip-9.0.1-py2.7.egg' and adding 'build/bdist.macosx-10.12-intel/egg' to itremoving 'build/bdist.macosx-10.12-intel/egg' (and everything under it)Processing pip-9.0.1-py2.7.eggcreating /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.eggExtracting pip-9.0.1-py2.7.egg to /Library/Python/2.7/site-packagesAdding pip 9.0.1 to easy-install.pth fileInstalling pip script to /usr/local/binInstalling pip2.7 script to /usr/local/binInstalling pip2 script to /usr/local/binInstalled /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.eggProcessing dependencies for pip==9.0.1Finished processing dependencies for pip==9.0.1

macs-Mac-mini:pip-9.0.1 mac$ sudo pip install -U selenium
The directory ‘/Users/mac/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/mac/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.
Requirement already up-to-date: selenium in /Library/Python/2.7/site-packages

pycharm

测试安装是否成功

http://blog.csdn.net/zxy987872674/article/details/53082896

http://blog.csdn.net/lj2tj/article/details/53082346
Chrome Driver:
http://chromedriver.storage.googleapis.com/index.html