Which version of BeautifulSoup works with GAE (pyt

2019-07-11 18:34发布

When I write

from BeautifulSoup import BeautifulSoup

I am getting the following error:

No module named BeautifulSoup

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.

1条回答
▲ chillily
2楼-- · 2019-07-11 19:24

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

Afterwards from BeautifulSoup.BeautifulSoup import BeautifulSoup should work.

查看更多
登录 后发表回答