在Python爬取网页数据的时候需要BeautifulSoup这个Python库,安装BeautifulSoup这个库的时候,用pip 或者 easy_install 来安装都可以:
pip install beautifulsoup4
easy_installbeautifulsoup4
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
在网上找了几个解决办法,亲测后这个办法还是最好的
(来自知乎)
最好在pip的安装路径下:
1. 安装wheel,命令行运行:
pip install wheel
2.在这里下载对应的.whl文件,注意别改文件名!
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
3. 进入.whl所在的文件夹,执行命令即可完成安装
还有一个办法,就是装上所需要的Microsoft Visual C++库,貌似比较麻烦
帮助网页:http://cuiqingcai.com/1319.html
http://www.zhimengzhe.com/windows/112812.html