安装ckanext-archiver时没有名为celery的模块

时间:2014-06-09 02:54:08

标签: exception celery ckan opendata

我使用CKAN作为我的开放数据门户网站,并尝试按照https://github.com/ckan/ckanext-archiver上的说明安装Archiver Extension。但是我遇到了这个错误,我在ckan配置文件中启用了归档程序后无法解决。

Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 321, in loadapp
    **kw)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 57, in make_app
    load_environment(conf, app_conf)
  File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
    p.load_all(config)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
    load(*plugins)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 149, in load
    service = _get_service(plugin)
  File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 255, in _get_service
    return plugin.load()(name=plugin_name)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources.py", line 2147, in load
    ['__name__'])
  File "/usr/lib/ckan/default/src/ckanext-archiver/ckanext/archiver/plugin.py", line 10, in <module>
    from ckan.lib.celery_app import celery
  File "/usr/lib/ckan/default/src/ckan/ckan/lib/celery_app.py", line 12, in <module>
    from celery import Celery
ImportError: No module named celery

我已经从激活的virtualenv和所需的库安装了扩展。

sudo pip install -e git+http://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver

Obtaining ckanext-archiver from git+http://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver
      Updating ./src/ckanext-archiver clone
      Running setup.py egg_info for package ckanext-archiver

Installing collected packages: ckanext-archiver
  Running setup.py develop for ckanext-archiver
    Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
    /usr/bin/python -E -c pass
    TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files

    Creating /usr/local/lib/python2.7/dist-packages/ckanext-archiver.egg-link (link to .)
    ckanext-archiver 0.1 is already the active version in easy-install.pth

    Installed /home/kean/src/ckanext-archiver
Successfully installed ckanext-archiver

sudo pip install requirements.txtDownloading/unpacking requirements.txt
  Real name of requirement requirements.txt is requirements.txt
  Could not find any downloads that satisfy the requirement requirements.txt
No distributions at all found for requirements.txt
Storing complete log in /home/kean/.pip/pip.log

欣赏是否有人知道如何解决这个问题。感谢。

1 个答案:

答案 0 :(得分:0)

当您使用virtualenv时,请不要致电sudo pip install,只需pip install

我有一些问题在执行:

pip install -e git://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver

导致

no matches found: git://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver

但是下面的命令工作正常:

cd /tmp/
git clone git://github.com/okfn/ckanext-archiver.git
pip install -e ./ckanext-archiver
pip install -r ckanext-archiver/pip-requirements.txt