您的位置:首页 > 编程语言 > Python开发

win7下安装easy_install

2015-05-22 17:22 211 查看
今天在用ipython跑爬虫代码,需要导入下面这两个包,由于我的ipython里面没有,需要安装,所有用到了easy_install
from selenium import webdriver

from bs4 import BeautifulSoup

easy_install安装过程如下:
1、首先下载setuptools,具体下载地址如下:
http://pypi.python.org/pypi/setuptools
2、我下载的是setuptools-16.0.zip (md5),解压该文件,我把解压后的文件放在D:\Python27\setuptools-16.0
(其实整个过程我只用了ez_setup.py,所以你也可以只下载ez_setup.py)
3、启动ipython,执行下面语句
%run D:\\Python27\\setuptools-16.0\\ez_setup.py
4、安装完后,打开你cmd.exe,执行下面语句测试easy_install 是否能用
c:\Users>easy_install
error:No urls,filenames,or requirements specified(see --help)
说明安装成功

另外 我在用easy_install 安装bs4时,出现下面错误:
error: Could not find suitable distribution for Requirement.parse('bs4')
而我直接执行easy_insatll BeautifulSoup
显示安装成功

python MySQLdb在windows环境下的快速安装、问题解决方式
请参考下面的blog http://blog.csdn.net/wklken/article/details/7253245[/code] 
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  win7 ipython easy_in