1
votes

I want to install a CKAN extension (plugin), but do not know how. This is the procedure that was performed:

  1. file download: download destination: /usr/lib/ckan/default/src/ckan
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/ckan/default/src/ckan/
        bin/
        ckan/
        ckan-egg-info/
        ckanext-geoview/
        ..etc

    /usr/lib/ckan/default/src/pip-delete-this-directory.txt
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2.Installation:
'$ cd /usr/lib/ckan/default/src/ckan'
'$ git clone https://github.com/ckan/ckanext-geoview.git'
'$ cd ckanext-geoview'
'$ python setup.py develop'

3.Add it in your configuration file:
'$ vi /etc/ckan/default/development.ini'

I changed the following.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ckan.plugins = resource_proxy geo_view ..... (other plugins...)

ckan.views.default_views = ... geo_view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4.Reload Apache:
'$ sudo service apache2 reload'

5.ckan db init:
'$ 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'

error message:
ckan.plugins.core.PluginNotFoundException: geo_view

1

1 Answers

0
votes

PluginNotFoundException means that CKAN has seen it in the config file (under ckan.plugins) but has not found it in the python environment.

I suspect that you had not activated your python environment when you did step 2.

I also noticed that you cloned ckanext-geoview when in the ckan source directory - it would be better to have it one directory up. To fix that you can do:

mv /usr/lib/ckan/default/src/ckan/ckanext-geoview /usr/lib/ckan/default/src/

Now try installing it into your python environment again:

source /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckanext-geoview
python setup.py develop

And reload CKAN (paster or apache)