【问题标题】:CKAN PluginNotFoundException in Pages Extension页面扩展中的 CKAN PluginNotFoundException
【发布时间】:2014-03-05 15:36:07
【问题描述】:

我使用 CKAN 作为我的开放数据门户。它是使用 Pylons 框架用 Python 编写的。我想集成ckanext-pages 插件。所以我使用了以下步骤。

1. . /usr/lib/ckan/default/bin/activate

2. pip install -e 'git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages'

3. cd /usr/lib/ckan/default/src/ckanext-pages

4. python setup.py develop

我仍然遇到异常。鉴于我尝试重新启动 CKAN 和 Apache 服务器。

ckan.plugins.core.PluginNotFoundException: pages

但是当我运行 python setup.py develop 命令时,插件仍然安装正确。请参阅下面的输出。

running develop
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
running egg_info
writing ckanext_pages.egg-info/PKG-INFO
writing namespace_packages to ckanext_pages.egg-info/namespace_packages.txt
writing top-level names to ckanext_pages.egg-info/top_level.txt
writing dependency_links to ckanext_pages.egg-info/dependency_links.txt
writing entry points to ckanext_pages.egg-info/entry_points.txt
WARNING: ckanext is a namespace package, but its __init__.py does
not declare_namespace(); setuptools 0.7 will REQUIRE this!
(See the setuptools manual under "Namespace Packages" for details.)

reading manifest file 'ckanext_pages.egg-info/SOURCES.txt'
writing manifest file 'ckanext_pages.egg-info/SOURCES.txt'
running build_ext
Creating /usr/local/lib/python2.7/dist-packages/ckanext-pages.egg-link (link to .)
Removing ckanext-pages 0.1 from easy-install.pth file
Adding ckanext-pages 0.1 to easy-install.pth file

Installed /usr/lib/ckan/default/src/ckanext-pages
Processing dependencies for ckanext-pages==0.1
Finished processing dependencies for ckanext-pages==0.1

即使它说插件安装正确,也会发生异常。我该如何解决这个问题?

【问题讨论】:

    标签: python apache exception ckan opendata


    【解决方案1】:

    您已将软件包安装到系统 Python (/usr/local/lib/python2.7/dist-packages) 中。确保使用 virtualenv 中的 pip 和 python。似乎virtualenv根本没有激活。尝试执行source /usr/lib/ckan/default/bin/activate 您也可以尝试使用 virtualenv 的绝对路径调用 pip 和 python。

    【讨论】:

    • 我尝试执行 source /usr/lib/ckan/default/bin/activate 然后执行以上 4 个命令。仍然发生同样的异常。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-11-10
    • 2012-08-23
    • 1970-01-01
    • 2015-06-27
    • 2012-02-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多