哪个版本BeautifulSoup与GAE(蟒蛇2.5)的作品? [英] Which version of BeautifulSoup works with GAE (python 2.5)?

查看:156
本文介绍了哪个版本BeautifulSoup与GAE(蟒蛇2.5)的作品?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我写

from BeautifulSoup import BeautifulSoup

我收到以下错误:

I am getting the following error:

No module named BeautifulSoup

所有文件都保存在项目文件夹,子文件夹BeautifulSoup。和它的作品好,如果BeautifulSoup.py放在哪里main.py是相同的文件夹中。

All files are saved at project folder, subfolder BeautifulSoup. And it works well if BeautifulSoup.py placed at the same folder where main.py is.

推荐答案

如果您要包括 BeautifulSoup 从子包(子目录),确保目录下有个 __ __初始化。PY 文件。

If you want to include BeautifulSoup from a subpackage (subdirectory), make sure that directory has a __init__.py file.

之后从BeautifulSoup.BeautifulSoup进口BeautifulSoup 应该工作。

这篇关于哪个版本BeautifulSoup与GAE(蟒蛇2.5)的作品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆