我尝试在 Linux Mint 16 中设置 Reddit API,以便可以在 IntelliJ 13.1.2/Java 中使用它。 所以我使用了这个指南:https://github.com/reddit/reddit/wiki/Install-guide 并开始于
$ git clone https://github.com/reddit/reddit.git
接下来我去了r2
$ cd reddit/r2
,但是当我尝试执行接下来的 3 行时:
$ python setup.py build
$ sudo python setup.py develop
$ make
我的控制台出了问题
Traceback (most recent call last):
File "setup.py", line 35, in <module>
pkg_resources.require("distribute>=0.6.16")
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 696, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 594, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute>=0.6.16
分别
Traceback (most recent call last):
File "setup.py", line 35, in <module>
pkg_resources.require("distribute>=0.6.16")
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 696, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 594, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute>=0.6.16
最后在“make”命令处控制台给出了:
Traceback (most recent call last):
File "Makefile.py", line 24, in <module>
from r2.lib.translation import I18N_PATH
File "/home/fox/reddit/r2/r2/lib/translation.py", line 28, in <module>
from babel.messages.extract import extract_javascript
ImportError: No module named babel.messages.extract
Makefile:41: *** Makefile.py failed. aborting. Schluss.
现在我不知道我应该做什么。这是我第一次使用 API,对此的经验为零。如果你们中有人能帮助我,那就太好了。
最佳答案
我遇到了同样的问题并通过运行解决了它:
easy_install distribute
关于java - 我需要帮助来设置 Reddit API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23445427/