python - 哪个版本的 BeautifulSoup 可与 GAE (python 2.5) 配合使用?

标签 python google-app-engine beautifulsoup

当我写作时

from BeautifulSoup import BeautifulSoup

我收到以下错误:

No module named BeautifulSoup

所有文件都保存在项目文件夹的子文件夹BeautifulSoup中。如果 BeautifulSoup.py 与 main.py 放在同一文件夹中,效果会很好。

最佳答案

如果您想包含子包(子目录)中的 BeautifulSoup,请确保该目录具有 __init__.py 文件。

之后 from BeautifulSoup.BeautifulSoup import BeautifulSoup 应该可以工作。

关于python - 哪个版本的 BeautifulSoup 可与 GAE (python 2.5) 配合使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8992516/

相关文章:

Python 在向 numpy 数组添加过程中从 long 进行转换

python - 导入 sklearn 时出现段错误

python-2.7 - 自 2019 年 7 月 30 日起,独立 App Engine SDK 已弃用。如何迁移 pycharm python2.7 应用程序

java - App Engine channel API 连接和断开

android - Google App Engine 中的 XMPP 支持

python - 使用Python抓取谷歌搜索结果标题和网址

python - Python无法在Raspberry Pi上编译

python - 从共享库中获取枚举定义

python - 使用 BeautifulSoup 从 HTML 创建 JSON 结构

python - 将变量设置为等于找到关键字的行