安装
下面主要以,Mac中Python 3
的bs4
为例,解释如何安装BeautifulSoup
:
pip3 install bs4
- 或:
pip install bs4
- 确保你的
pip
是Python 3
版本
- 确保你的
- 或:
举例:
➜ reVsBeautifulSoup pip3 install bs4
Collecting bs4
Downloading bs4-0.0.1.tar.gz (1.1 kB)
Collecting beautifulsoup4
Downloading beautifulsoup4-4.8.2-py3-none-any.whl (106 kB)
|████████████████████████████████| 106 kB 65 kB/s
Collecting soupsieve>=1.2
Downloading soupsieve-1.9.5-py2.py3-none-any.whl (33 kB)
Building wheels for collected packages: bs4
Building wheel for bs4 (setup.py) ... done
Created wheel for bs4: filename=bs4-0.0.1-py3-none-any.whl size=1272 sha256=603268b090d3e1b68d5f70078c71c667ef0adab7433943d30bcbdd288161735f
Stored in directory: /Users/crifan/Library/Caches/pip/wheels/0a/9e/ba/20e5bbc1afef3a491f0b3bb74d508f99403aabe76eda2167ca
Successfully built bs4
Installing collected packages: soupsieve, beautifulsoup4, bs4
Successfully installed beautifulsoup4-4.8.2 bs4-0.0.1 soupsieve-1.9.5
查看已安装的版本:
➜ reVsBeautifulSoup pip3 show bs4
Name: bs4
Version: 0.0.1
Summary: Screen-scraping library
Home-page: https://pypi.python.org/pypi/beautifulsoup4
Author: Leonard Richardson
Author-email: leonardr@segfault.org
License: MIT
Location: /usr/local/lib/python3.7/site-packages
Requires: beautifulsoup4
Required-by:
此处已安装的版本是:
bs4
:0.0.1
- 依赖库
BeautifulSoup4
:4.8.2
soupsieve
:1.9.5
- 依赖库