gpt4 book ai didi

python - CKAN 安装 : paster error

转载 作者:太空狗 更新时间:2023-10-30 01:51:19 25 4
gpt4 key购买 nike

在 OSX 10.9 上本地安装 CKAN,基于 http://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html .

我已经创建并激活了 python virtualenv,现在需要创建一个 CKAN 配置文件:

$ paster make-config ckan /etc/ckan/default/development.ini

输出结果如下(最后一行ImportError):

Distribution already installed:
ckan 2.2 from ~/ckan/lib/default/src/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/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/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/appinstall.py", line 68, in run
return super(AbstractInstallCommand, self).run(new_args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/appinstall.py", line 295, in command
self.distro, self.options.ep_group, self.options.ep_name)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/appinstall.py", line 234, in get_installer
'paste.app_install', ep_name)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources.py", line 2302, in load_entry_point
return ep.load()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources.py", line 2029, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "~/ckan/lib/default/src/ckan/ckan/config/install.py", line 3, in <module>
from pylons.util import PylonsInstaller
ImportError: No module named pylons.util

我不确定如何进行,有什么想法吗?

最佳答案

ImportError: No module named pylons.util 看起来 Python 找不到 Pylons 包,这是 CKAN 所依赖的 Python 包之一。我想到了两种可能性:

  1. 在运行 paster 命令之前,您是否激活了 CKAN virtualenv? ~/ckan/default/bin/activate

  2. 你有没有把CKAN依赖的Python包安装到你的virtualenv中?激活 virtualenv 后运行 pip install -r ~/ckan/default/src/ckan/requirements.txt

如果激活 CKAN 虚拟环境然后运行 ​​pip freeze | grep pylons,这应该告诉你 pylons 是否安装在 virtualenv 中。

终端输出顶部的 Distribution already installed: 很奇怪。

关于python - CKAN 安装 : paster error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21955234/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com