python beautifulsoap的安装
来源:互联网 发布:淘宝包邮退货邮费规则 编辑:程序博客网 时间:2024/06/05 16:12
Beautiful Soup 是用Python写的一个HTML/XML的解析器,它可以很好的处理不规范标记并生成剖析树(parse tree)。
(1)windows环境下安装 beautiful soap
1.在beautiful soap官网上下载beautiful soap最新版本“beautifulsoup4-4.5.3.tar.gz”
beautiful soap官网:https://www.crummy.com/software/BeautifulSoup/#Download2.将下载的压缩文件解压后放在python的安装目录中(E:\Program Files\Python35)
从cmd命令窗口进入解压后的文件夹:cd E:\Program Files\Python35\beautifulsoup4-4.5.3\beautifulsoup4.egg-info
然后执行: python setup.py install
3.检验是否安装成功
打开cmd窗口;输入python,进入python模块;然后输入from bs4 import BeautifulSoup如果没有错误说明导入成功
(Python3里一定要安装beautifulsoup4的版本,其它版本安装不上的。)
(2)linux环境下安装beautiful soap
1.检查本地的python版本
打开终端窗口,输入python 查看python版本。
linux环境下将python2升级为python3的方法:
http://www.cnblogs.com/idotest/p/5442173.html
2.按照windows方法下载安装包后:
进入beautifulsoup4-4.3.0目录,然后在命令行输入python setup.py install
或者sudo python setup.py install
(电脑上同时安装了pythoon2 和python3时,使用python3时 要使用“python3” 而不是“python” 语句)
参考:http://jingyan.baidu.com/article/afd8f4de6197c834e386e96b.html
http://jingyan.baidu.com/article/925f8cb8f7d329c0dce0567d.html
- python beautifulsoap的安装
- BeautifulSoap 安装和使用
- beautifulsoap 安装失败问题
- python 爬虫好文 urllib cookie beautifulsoap
- beautifulsoap 中文文档
- Python--day1 Python的安装
- 爬虫实例抓取并download with Beautifulsoap
- 从零开始学网络爬虫之BeautifulSoap
- Python 库的安装...
- Python--Setuptools的安装
- Python-- easy_install 的安装
- python的安装
- python工具的安装
- python BeautifulSoup的安装
- Windows-----Python的安装
- Python-- easy_install 的安装
- Python包的安装
- python Matplotlib的安装
- Ubuntu 16.04搭建LAMP开发环境
- 读Android经典系列一-Android编程权威指南-第三版英文版:全书大纲
- sublime text3插件安装方法
- 如何快速转载CSDN中的博客
- 简单排序算法整理及体会
- python beautifulsoap的安装
- 虚拟机参数总结
- css 竖直居中
- 【3.9】
- 20条LINUX常用命令
- poj3414
- 框架模式笔记:MVC 与MVP框架(完)
- CentOS下安装mysql
- 每日十道面试题(四)