问题描述
我将CKAN用作开放数据门户,并尝试按照。但是我遇到了这个错误,在我的ckan配置文件中启用了存档程序后,我无法解决。
I'm using CKAN as my open data portal and am trying to install the Archiver Extension by following the instructions at https://github.com/ckan/ckanext-archiver. However I am faced with this error which I could not solve after enabling the archiver in my ckan config file.
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的扩展和所需的库。
I have installed the extension from an activated virtualenv and the required libraries.
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
如果任何人都知道如何解决此问题。谢谢。
Appreciate if anyone knows how to fix this. Thanks.
推荐答案
在使用时不要调用 sudo pip install
virtualenv,只需 pip安装
。
Do not call sudo pip install
when you are using virtualenv, just pip install
.
我在执行时遇到了一些问题:
I had some issues executing:
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
但是下面的命令可以正常工作:
but below commands worked just fine:
cd /tmp/
git clone git://github.com/okfn/ckanext-archiver.git
pip install -e ./ckanext-archiver
pip install -r ckanext-archiver/pip-requirements.txt
这篇关于安装ckanext-archiver时没有名为celery的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!