我试图在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/

10-11 14:54