python+selenium自动化测试环境搭建
1、python的安装:
官网下载安装包:https://www.python.org/getit/
安装好之后配置环境变量:
2、setuptools的安装
官网下载安装包:https://pypi.python.org/pypi/setuptools
将下载下来的压缩包解压到python的安装目录:
安装步骤:cd 到解压的目录下
python setup.py install 安装setuptools
安装成功:
3、pip下载安装
下载地址:https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb
将下载下来的压缩包解压到python的安装目录:
安装步骤:cd 到解压的目录下
python setup.py install 安装pip
安装成功:
配置pip的镜像
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
使用方法:在你的“C:\Users\你的用户名\”目录下创建“pip”目录,“pip”目录下创建“pip.ini”文件
文件内容:pip.ini”文件内容(比如使用清华镜像):
[global]
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com