如何在 Digital Ocean droplet 中安装 BeautifulSoup?
How can I install BeautifulSoup in a Digital Ocean droplet?
我使用的是最基本的服务,运行 Ubuntu(标准配置),我在自己使用 bs4 的 PC 上开发了一些 python 脚本,当我上传它们它说经典错误:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
所以我尝试 pip install lxml
,它要求安装 libxml2
,依此类推...
我不是 Linux 人,我更像是一个 Windows 人,我知道也许我必须编译一些东西,但我不知道是什么或如何编译。我整个中午都在找教程,但找不到任何有用的东西。
如果您使用 ubuntu
,使用 apt-get install python-bs4
或 apt-get install python3-bs4
安装预打包版本会更容易
我使用的是最基本的服务,运行 Ubuntu(标准配置),我在自己使用 bs4 的 PC 上开发了一些 python 脚本,当我上传它们它说经典错误:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
所以我尝试 pip install lxml
,它要求安装 libxml2
,依此类推...
我不是 Linux 人,我更像是一个 Windows 人,我知道也许我必须编译一些东西,但我不知道是什么或如何编译。我整个中午都在找教程,但找不到任何有用的东西。
如果您使用 ubuntu
,使用 apt-get install python-bs4
或 apt-get install python3-bs4