【问题标题】:Unable to import beautifulsoup4 module in Termux无法在 Termux 中导入 beautifulsoup4 模块
【发布时间】:2019-11-15 03:41:27
【问题描述】:

这是显示我无法导入 beautifulsoup4 的完整日志

$ python
Python 3.7.5 (default, Oct 23 2019, 08:30:10)
[Clang 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf6 on linux
Type "help", "copyright", "credits" or "license" for more information.

import bs4
from bs4 import beautifulsoup4

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'beautifulsoup4' from 'bs4' (/data/data/com.termux/files/usr/lib/python3.7/site-packages/bs4/__init__.py)

import beautifulsoup4

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'beautifulsoup4'

【问题讨论】:

  • pip install beautifulsoup4
  • 先尝试安装漂亮的汤,方法是输入命令@αԋɱҽԃαмєяιcαη 提到
  • 你确定字符大小写吗?
  • 提前致谢。它(Termux)告诉我beautifulsoup4已经安装成功。但是我不能使用beautifulsoup4。

标签: python termux


【解决方案1】:

这对我有用:

>>> from bs4 import BeautifulSoup
>>>

【讨论】:

    猜你喜欢
    • 2019-02-03
    • 2021-12-29
    • 2020-06-06
    • 2019-12-15
    • 2014-08-09
    • 2020-07-02
    • 1970-01-01
    • 1970-01-01
    • 2022-09-27
    相关资源
    最近更新 更多