centos7 打造基于python语言Selenium2自动化开发环境

1. 准备

安装模块

# yum groupinstall "Development tools"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel


# Python 2.7.6:
# wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
# tar xf Python-2.7.6.tar.xz
# cd Python-2.7.6
# ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
#make && make altinstall(此处切记,要么以root运行,要么分开执行!)
 
 
 
# Python 3.3.5:
# wget http://python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
# tar xf Python-3.3.5.tar.xz
# cd Python-3.3.5
# ./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
#  make && make altinstall(此处切记,要么以root运行,要么分开执行!)
 
 
 

下载和安装Setuptools + pip

Setuptools 早已取代 Distribute 成为Python官方的拓展包管理器,以用于从Python Package Index安装拓展功能包。 不同版本的Python需要的Setuptools版本不同。建议您也通过Setuptools安装 pip,它提供了一些额外在安装拓展功能包时很有用的功能。

以下的命令可用于安装最新版Setuptools 和 pip

 

# First get the setup script for Setuptools:

wgethttps://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
 
# Then install it for Python 2.7 and/or Python 3.3:
 
python2.7ez_setup.py
python3.3ez_setup.py
 
# Now install pip using the newly installed setuptools:
 
easy_install-2.7pip
easy_install-3.3pip
 
# With pip installed you can now do things like this:
 
pip2.7install[packagename]
pip2.7install--upgrade[packagename]
pip2.7uninstall[packagename]
 
安装的拓展功能包在  /usr/local/lib/pythonX.Y/site-packages/ 中可以找到( X.Y 是Python的版本号)。
 
 



 
 
 
 
 
 
 

转载于:https://www.cnblogs.com/lunhui/p/5992790.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值