安装 CKAN 扩展时出现 PluginNotFoundException
PluginNotFoundException when installing CKAN extension
我想安装一个 CKAN 扩展(插件),但不知道如何安装。
这是执行的程序:
- 文件下载:
下载目的地:/usr/lib/ckan/default/src/ckan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/ckan/default/src/ckan/
仓/
ckan/
ckan-egg-info/
ckanext-geoview/
..等等
/usr/lib/ckan/default/src/pip-delete-this-directory.txt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2.安装:
'$ cd /usr/lib/ckan/default/src/ckan'
'$git克隆https://github.com/ckan/ckanext-geoview.git'
'$ cd ckanext-geoview'
'$pythonsetup.py发展'
3.Add 在你的配置文件中:
'$vi/etc/ckan/default/development.ini'
我更改了以下内容。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ckan.plugins = resource_proxy geo_view .....(其他插件...)
ckan.views.default_views = ... geo_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.Reload阿帕奇:
'$ sudo service apache2 reload'
5.ckan 数据库初始化:
'$ su -s /bin/bash - ckan'
'$。 default/bin/activate'
'$ cd /usr/lib/ckan/default/src/ckan'
'$ /usr/lib/ckan/default/bin/paster --plugin=ckan db init --config=/etc/ckan/default/development.ini'
错误信息:
ckan.plugins.core.PluginNotFoundException: geo_view
PluginNotFoundException 意味着 CKAN 已经在配置文件中看到它(在 ckan.plugins 下)但是在 python 环境中没有找到它。
我怀疑您在执行第 2 步时没有激活 python 环境。
我还注意到您在 ckan 源目录中克隆了 ckanext-geoview - 最好将它放在一个目录上。要解决这个问题,您可以这样做:
mv /usr/lib/ckan/default/src/ckan/ckanext-geoview /usr/lib/ckan/default/src/
现在再次尝试将其安装到您的 python 环境中:
source /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckanext-geoview
python setup.py develop
并重新加载 CKAN(paster 或 apache)
我想安装一个 CKAN 扩展(插件),但不知道如何安装。 这是执行的程序:
- 文件下载:
下载目的地:/usr/lib/ckan/default/src/ckan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/ckan/default/src/ckan/
仓/
ckan/
ckan-egg-info/
ckanext-geoview/
..等等
/usr/lib/ckan/default/src/pip-delete-this-directory.txt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2.安装:
'$ cd /usr/lib/ckan/default/src/ckan'
'$git克隆https://github.com/ckan/ckanext-geoview.git'
'$ cd ckanext-geoview'
'$pythonsetup.py发展'
3.Add 在你的配置文件中:
'$vi/etc/ckan/default/development.ini'
我更改了以下内容。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ckan.plugins = resource_proxy geo_view .....(其他插件...)
ckan.views.default_views = ... geo_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.Reload阿帕奇:
'$ sudo service apache2 reload'
5.ckan 数据库初始化:
'$ su -s /bin/bash - ckan'
'$。 default/bin/activate'
'$ cd /usr/lib/ckan/default/src/ckan'
'$ /usr/lib/ckan/default/bin/paster --plugin=ckan db init --config=/etc/ckan/default/development.ini'
错误信息:
ckan.plugins.core.PluginNotFoundException: geo_view
PluginNotFoundException 意味着 CKAN 已经在配置文件中看到它(在 ckan.plugins 下)但是在 python 环境中没有找到它。
我怀疑您在执行第 2 步时没有激活 python 环境。
我还注意到您在 ckan 源目录中克隆了 ckanext-geoview - 最好将它放在一个目录上。要解决这个问题,您可以这样做:
mv /usr/lib/ckan/default/src/ckan/ckanext-geoview /usr/lib/ckan/default/src/
现在再次尝试将其安装到您的 python 环境中:
source /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckanext-geoview
python setup.py develop
并重新加载 CKAN(paster 或 apache)