[Ckan-users] Installing ckanext-harvest, having trouble with paster initdb call "DistributionNotFound"

Adrià Mercader adria.mercader at okfn.org
Tue May 23 13:24:31 UTC 2017


Hi Jenny,

I'm not familiar with the miniconda package manager but these errors seem
to suggest that the extension was not installed properly. I would suggest
using the pip binary that is part of the virtualenv, something like:


Step 31/46 : RUN /usr/lib/ckan/default/bin/pip install -e git+
https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest
Step 32/46 : RUN /usr/lib/ckan/default/bin/pip install -r
/usr/lib/ckan/default/src/ckanext-harvest/pip-requirements.txt
Step 33/46 : RUN /usr/lib/ckan/default/bin/paster --plugin=ckanext-harvest
harvester initdb --config=/etc/ckan/default/production.ini

This is closer to what the install instructions suggest. Let me know if
this helps.

Adrià

On 22 May 2017 at 22:36, Jenny Brown <jenny.brown at climate.com> wrote:

> Install instructions show:
>
> (pyenv) $ paster --plugin=ckanext-harvest harvester initdb
> --config=/etc/ckan/default/production.ini
>
> but I am receiving an error.  I'm on CKAN 2.6.  I'm installing in docker
> on ubuntu, using the python-ckan-2.6-trust-amd64 deb.
> My ckan installation was working fine until I tried to add the harvester
> extension, so I think my issues are specific to that.
>
>
> I noticed first that the pip install step landed the extension in
> "/src/ckanext-harvest" off the root instead of inside the ckan dir.  I
> moved it into place, but I am not sure if there are additional config steps
> to do there or if something was wrong during my pip install that it landed
> in an odd place.
>
>
> Secondly, the paster command files with an error that seems like it either
> doesn't know about plugin ckanext-harvest, or that some other component was
> missing, but the error is unclear to me.
>
>
> Here's the relevant output from the docker build where it's running.
>
> Step 30/46 : RUN . /usr/lib/ckan/default/bin/activate
> Step 31/46 : RUN /opt/miniconda/bin/pip install -e git+
> https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest
> Step 32/46 : RUN mv /src/ckanext-harvest /usr/lib/ckan/default/src
> Step 33/46 : RUN cd /usr/lib/ckan/default/src/ckanext-harvest &&
> /opt/miniconda/bin/pip install -r pip-requirements.txt
> Step 34/46 : RUN /usr/lib/ckan/default/bin/paster
> --plugin=ckanext-harvest harvester initdb --config=/etc/ckan/default/
> production.ini
>
> Traceback (most recent call last):
>   File "/usr/lib/ckan/default/bin/paster", line 11, in <module>
>     sys.exit(run())
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 91, in run
>     commands = get_commands()
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 133, in get_commands
>     plugins = pluginlib.resolve_plugins(plugins)
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/pluginlib.py",
> line 83, in resolve_plugins
>     pkg_resources.require(plugin)
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 968, in require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 854, in resolve
>     raise DistributionNotFound(req, requirers)
> pkg_resources.DistributionNotFound
>
> The command '/bin/sh -c /usr/lib/ckan/default/bin/paster
> --plugin=ckanext-harvest harvester initdb --config=/etc/ckan/default/production.ini'
> returned a non-zero code: 1
>
>
> Thanks!
>
>
>
>
>
> _______________________________________________
> ckan-users mailing list
> ckan-users at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-users/attachments/20170523/b185e4ed/attachment-0003.html>


More information about the ckan-users mailing list