1

我正在尝试运行示例:

https://github.com/litl/rauth/blob/master/examples/facebook/facebook.py

所以我从命令行运行这个例子,输出显示:

* Running on http://127.0.0.1:5000/
* Restarting with reloader

并且程序在前台运行。现在我想让我们看看在浏览器中输入 url 时会发生什么:

http://127.0.0.1:5000/

它显示:

jinja2.exceptions.TemplateNotFound

所以我想让我们仔细看看源代码,这就是我发现的:

Please note: you must do `from facebook import db; db.create_all()` from
the interpreter before running this example!
Due to Facebook's stringent domain validation, requests using this app
must originate from 127.0.0.1:5000.

所以我想可能我必须从 python shell 运行它。所以我在 python shell 中输入命令:

from facebook import db; db.create_all()

现在我得到错误:

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

所以我想可能是我应该安装 facebook。所以我安装它:

pip install facebook

这是成功的。然后我再次从 python shell 运行命令:

from facebook import db; db.create_all()

现在我得到错误:

Downloading/unpacking facebook.db
  Could not find any downloads that satisfy the requirement facebook.db
No distributions at all found for facebook.db

怎么办?我被困住了。请帮助某人。

谢谢

4

0 回答 0