Python中BeautifulSoup的安装
来源:互联网 发布:windows上安装docker 编辑:程序博客网 时间:2024/05/22 07:40
安装BeautifulSoup
因为爬虫学习python,却在一开始就败给了了BeautifulSoup的安装,真的是花费了几个小时百度之后有一种炸裂的感觉。废话在不说了,直接为大家上干货。
Linux系统上的基本安装方法是:
$sudo apt-get install python-bs4
对于 Mac系统,首先用
$sudo easy_install pip
安装 Python的包管理器 pip,然后运行
$pip install beautifulsoup4
来安装库文件。
另外,注意如果你的设备同时安装了 Python 2.x和 Python 3.x,你需要用 python3 运行
Python 3.x:
$python3 myScript.py
当你安装包的时候,如果有可能安装到了 Python 2.x而不是 Python 3.x里,就需要使用:
$sudo python3 setup.py install
如果用 pip安装,你还可以用pip3安装 Python 3.x版本的包:
$pip3 install beautifulsoup4
在 Windows系统上安装与在Mac和 Linux上安装差不多。从上面的下载链接下载最新的
BeautifulSoup 4源代码,解压后进入文件,然后执行:
>python setup.py install
这样就可以了! BeautifulSoup将被当作设备上的一个 Python库。你可以在 Python终端里
导入它测试一下:
一定要主要python的版本与Beautiful版本的对应关系。哈哈,先歇一会。
阅读全文
0 0
- Python中BeautifulSoup的安装
- python中BeautifulSoup模块的安装
- Python中 BeautifulSoup模块的安装
- python BeautifulSoup的安装
- Python的BeautifulSoup安装
- python BeautifulSoup模块的安装
- python beautifulsoup的安装导入
- python BeautifulSoup模块的安装
- python BeautifulSoup模块的安装
- 有关Python中beautifulsoup安装遇到的问题
- python BeautifulSoup 的安装和使用
- Python beautifulsoup的安装与使用
- Python库beautifulsoup的安装与使用
- python BeautifulSoup 安装
- python BeautifulSoup 安装
- 安装python BeautifulSoup插件
- Python 安装 BeautifulSoup(Win7)
- python中用beautifulSoup 安装
- 什么是Schema
- ACM_03复习高中知识
- Java enum(枚举) 详解
- 一个千万量级的APP使用的一些第三方库
- 视频检验--比较检材与样本的物理特性
- Python中BeautifulSoup的安装
- pyhotn3入门基础-13 高阶函数
- 百度地图API 使用Demo
- solr分页查询
- sublime Text安装Vue插件方法
- jQuery Extensions
- 禁止网页使用右键
- bind DNS服务配置
- select多选框改造的双框多选框