Python中的easy_install工具很爽,它的作用类似于Php中的pear,或者Ruby中的gem,或者Perl中的cpan。
如果想使用easy_install工具,可能需要先安装setuptools,不过更酷的方法是使用ez_setup.py脚本:
wget -q http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
安装完后,最好确保easy_install所在目录已经被加到PATH环境变量里:
Windows: C:\Python25\Scripts
Linux: /usr/local/bin
比如说要安装Python的MySQL支持,可以执行如下命令,系统会自动在pypi网站列表里查找相关软件包:
easy_install MySQL-python
如果你在Windows+python2.5上执行如上命令的话,可能会出现如下错误:
Processing MySQL-python-1.2.3c1.tar.gz
Running MySQL-python-1.2.3c1\setup.py -q bdist_egg –dist-dir c:\docume~1\…
\locals~1\temp\easy_install-fvvfve\MySQL-python-1.2.3c1\egg-dist-tmp-q9moxf
error: The system cannot find the file specified
出现这类错误的原因是选错了版本,针对这个案列,我们可以显式指定软件包的版本号:
easy_install “MySQL-python==1.2.2″
通过easy_install安装软件,相关安装信息会保存到easy-install.pth文件里,路径类似如下形式:
Windows:C:\Python25\Lib\site-packages\easy-install.pth
Linux:/usr/local/lib/python25/site-packages/easy-install.pth
如果想删除通过easy_install安装的软件包,比如说:MySQL-python,可以执行命令:
easy_install -m MySQL-python
此操作会从easy-install.pth文件里把MySQL-python的相关信息抹去,剩下的egg文件,你可以手动删除。
参考:http://www.ibm.com/developerworks/cn/linux/l-cppeak3.html
分享到:
相关推荐
python安装工具包easy_install,直接python ez-setup.py即可完成easy_install的安装,无需解压官网setuptools里的文件
easy_install ez_install.py 生成文件 python
Python2.7 pip的easy_install-2.7下载 Python2.7 pip的easy_install-2.7下载
使用ActivePython的安装,自带了easy_install
使用gevent,可以对并发多个http请求的爬虫程序进行很好的优化, 缺点是,安装相对麻烦,这个包依赖于libevent,在windows下面用easy_install直接安装是不行的,福利来了,windowns版本的安装包一枚
两个.py文件 直接运行可以安装 easy_install和pip
easy_install pip
如果想使用easy_install工具,可能需要先安装setuptools,不过更酷的方法是使用ez_setup.py脚本:复制代码 代码如下:wget -q http://peak.telecommunity.com/dist/ez_setup.pypython ez_setup.py 安装完后,最好确保...
python 安装easy_install和pip
只需要把这个代码下载后放到C:\Python27\Scripts中,或者没有安装pip和easy_install时放在C:\Python27中都可,然后用命令行安装python SSLproblem.py 然后一切问题就都解决了
easy_install是一个python的扩展包,主要是用来简化python安装第三方安装包,在安装了easy_install之后,安装python第三方安装包就只需要在命令行中输入:easy_install packagename,然后程序会自动搜索相应版本的...
python的 easy_install 安装包,实测可用。python setup.py build python setup.py install
easy_install-script.py
附带说明: cd进入papy-setuptools文件夹,执行python setup.py install将安setuptools工具集。会发现在python安装目录下有个script文件夹,里面有easy_install工具。
easy_install更准确的说是一个和... 使用easy_install需要先安装setuptools工具,然后将easy_install所在目录加到PATH环境变量里: Windows: C:\Python25\Scripts 如果想删除通过easy_install安装的软件包,比如
DITA OT 可以是xml转换成各种格式 包括pdf htmlhelp chm等
pip_install.py 手动 pip 安装文件. 下载文件,放置在 python 安装目录中的 Scripts 目录中,例如: C:\Python34\Scripts 然后运行 pip_install.py 即可安装 pip
easy_install安装代码 ez_setup.py
python easy_install 是一个自动从网上搜寻并下载安装第三方python库的工具,省去了手动安装的麻烦,十分方便。本人提供此安装包并总结了安装方法,一并分享给大家。