0

这个问题是特定于 Web2py 框架的。代码在它之外运行良好。

我已经在 Modules 目录中安装了 bs4 和 BeautifulSoup4。

sudo pip install bs4 --target /home/www-data/web2py/applications/myapp/modules
sudo pip install beautifulsoup4 --target /home/www-data/web2py/applications/myapp/modules

但我仍然收到错误:

找不到具有您要求的功能的树生成器:html.parser。您需要安装解析器库吗?

我升级了bs4

sudo pip install --upgrade bs4 --target /home/www-data/web2py/applications/rip/modules
pip install beautifulsoup4

但它再次出现同样的错误。

我在:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial

Web2py:

Version
2.15.4-stable+timestamp.2017.09.02.04.02.22
(Running on Apache/2.4.18 (Ubuntu), Python 2.7.12)
4

0 回答 0