Ubuntu18.04系统如何安装BeautifulSoup库
发布时间:2023-4-6 17:13:49 来源: 纵横云
Ubuntu18.04系统如何安装BeautifulSoup库
Beautiful Soup 是一个可以从HTML或XML文件中提取数据的Python库。那么在ubuntu18.04中如何安装BeautifulSoup呢?本文给出详细说明。
1.首先确认安装了python3

说明:一般linux系统默认都有安装python环境,包括python2和python3,在命令行中python默认指的是python2。python2已经接近淘汰,但由于linux系统环境中还有大量基于python2的软件,因此在linux系统中还保留着python2。目前推荐使用python3。
2.更新软件列表
sudo apt-get update

3.安装python3-pip
sudo apt install python3-pip

4.安装BeautifulSoup库
sudo pip3 install BS4

5.查看是否安装成功
pip3 list | grep beautifulsoup

本文来源:
https://www.zonghengcloud.com/article/10208.html
[复制链接]
链接已复制