[ckan-dev] ImportError: cannot import name get_library_registry

Reinoud Bosch rbo at iisg.nl
Sun Jul 7 20:38:48 UTC 2013


Thanks a lot for responding!

I've decided to try an install on a clean Ubuntu 13.04 system using package install for CKAN.

First I run Software Updater. Then I open a terminal; here are my installation notes (who knows these might be useful for anyone having trouble installing CKAN on Ubuntu 13.04):

sudo su 
→ password
apt-get install -y nginx apache2 libapache2-mod-wsgi libpq5
wget http://packaging.ckan.org/python-ckan-2.0_amd64.deb
dpkg -i python-ckan-2.0_amd64.deb
apt-get install -y postgresql solr-jetty openjdk-6-jdk
cd /etc/default
gedit jetty
	NO_START=0
	JETTY_HOST=127.0.0.1
	JETTY_PORT=8983
→ save and close
service jetty start 
→ solr works on localhost:8983/solr
mv /etc/solr/conf/schema.xml   /etc/solr/conf/schema.xml.bak
ln -s /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema-2.0.xml   /etc/solr/conf/schema.xml
service jetty restart 
→ solr works again
sudo postgres psql -l 
→ utf ok
sudo -u postgres createuser -S -D -R -P ckan_default
→ ckanpassword
sudo -u postgres createdb -O ckan_default ckan_default -E utf-8
mkdir -p /etc/ckan/default
chown `whoami` /etc/ckan
apt-get install python-pastescript
easy_install -U Pylons
cd /usr/lib/ckan/default/src/ckan
paster make-config ckan /etc/ckan/default/development.ini
cd /etc/ckan/default
gedit development.ini
	sqlalchemy.url = postgresql://ckan_default:ckanpassword/ckan_default
	solr_url = http://127.0.0.1:8983/solr
→ save and close

So far so good; now the trouble starts. I follow suggestions from http://docs.ckan.org/en/ckan-2.0/install-from-source.html#postgres-setup

Here I go:

cd /usr/lib/ckan/default/src/ckan
paster db init -c /etc/ckan/default/development.ini

With repeated trying I get a number of messages indicating that modules are missing, so I install them:

easy_install fanstatic
easy_install sqlalchemy
easy_install repose.who
easy_install pyutilib.component.core
easy_install babel
easy_install genshi
easy_install vdm

Trying paster db init -c /etc/ckan/default/development.ini after that last easy_install gives me the message:

ValueError: VDM only works with SQLAlchemy versions 0.4 through 0.7, not: 0.8.2

This is when I currently give up. 

I tried the install from source but that proved even more tricky.

I have the feeling there should be an easier way to install required python-packages that could resolve this problem.

Do you have any idea?

Thanks so much,

Reinoud

________________________________________
Van: ckan-dev-bounces at lists.okfn.org [ckan-dev-bounces at lists.okfn.org] namens Dave Caraway [dave at fogmine.com]
Verzonden: zondag 7 juli 2013 17:47
Aan: CKAN Development Discussions
Onderwerp: Re: [ckan-dev] ImportError: cannot import name get_library_registry

new to project myself, but wondering if you have fantastic installed.
have you run
pip install -r requirements.txt
?

if so, make sure if you installed in virtual environment that you
activate that environment using the <virtenv>/Scripts/activate




On Jul 7, 2013, at 9:33 AM, Reinoud Bosch <rbo at iisg.nl> wrote:

> Hi,
>
> I am trying to install CKAN but I get an ImportError: cannot import name get_library_registry:
>
> paster db init -c /etc/ckan/default/development.ini
> Traceback (most recent call last):
>  File "/usr/bin/paster", line 4, in <module>
>    command.run()
>  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 103, in run
>    command = commands[command_name].load()
>  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2013, in load
>    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
>  File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 10, in <module>
>    import ckan.lib.fanstatic_resources as fanstatic_resources
>  File "/usr/lib/ckan/default/src/ckan/ckan/lib/fanstatic_resources.py", line 6, in <module>
>    from fanstatic import Library, Resource, Group, get_library_registry
> ImportError: cannot import name get_library_registry
>
> Do you have any hints on how to resolve this? Thanks,
>
> Reinoud
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev

_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev




More information about the ckan-dev mailing list