[ckan-dev] Install CKAN on Ubuntu 13.04
Reinoud Bosch
rbo at iisg.nl
Tue Jul 9 15:43:55 UTC 2013
Thanks Hendrik, that got me past the MAXREPEAT and no module named _csv errors. Now I run into the following error when I try sudo ckan db init
ImportError: No module named simplejson
I've tried easy_install simplejson, easy_install json, pip install simpejson, and pip install json but the error remains. This also seems related to python 2.7.4.
Any hints?
Full traceback below:
Traceback (most recent call last):
File "/usr/bin/ckan", line 45, in <module>
load_entry_point('PasteScript', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 124, in command
self._load_config()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 81, in _load_config
conf = appconfig('config:' + self.filename)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 261, in appconfig
global_conf=global_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
return loader.get_context(object_type, name, global_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 454, in get_context
section)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
object_type, name=use, global_conf=global_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context
global_conf=global_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
return loader.get_context(object_type, name, global_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context
object_type, name=name)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
possible.append((entry.load(), protocol, entry.name))
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1989, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 14, in <module>
from pylons import config
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/__init__.py", line 4, in <module>
from pylons.config import config
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/config.py", line 2, in <module>
from pylons.configuration import *
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/configuration.py", line 25, in <module>
import pylons.legacy
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/legacy.py", line 9, in <module>
import pylons.decorators
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pylons/decorators/__init__.py", line 14, in <module>
import simplejson
ImportError: No module named simplejson
Thanks.
________________________________________
Van: ckan-dev-bounces at lists.okfn.org [ckan-dev-bounces at lists.okfn.org] namens Hendrik Bunke [bunke.hendrik at gmail.com]
Verzonden: dinsdag 9 juli 2013 13:30
Aan: CKAN Development Discussions
Onderwerp: Re: [ckan-dev] Install CKAN on Ubuntu 13.04
--On 2013-07-09 00:50, Reinoud Bosch wrote:
> Has anyone installed CKAN on Ubuntu 13.04? If so, do you have installation notes?
>
> As a newbie I have been trying very hard the last couple of days, but I keep running into problems. Below is what I tried and some of the issues I ran into. Thanks for any help.
>
>
> sudo su
> 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
> gedit /etc/default/jetty
> NO_START=0
> JETTY_HOST=127.0.0.1
> JETTY_PORT=8983
> 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 start
> sudo -u postgres createuser -S -D -R -P ckan_default [password]
> sudo -u postgres createdb -O ckan_default ckan_default -E utf-8
>
> # at this point I miss production.ini, so I do the following:
>
> apt-get install python-pastescript
> easy_install -U Pylons
> cd /usr/lib/ckan/default/src/ckan
> paster make-config ckan /etc/ckan/default/production.ini
> gedit /etc/ckan/default/production.ini
> sqlalchemy.url = postgresql://ckan_default:[password]@localhost/ckan_default
> solr_url= http://127.0.0.1:8983/solr
>
> # now things go awry, I try:
>
> sudo ckan db init
>
> # and get the message
>
> from _sre import MAXREPEAT
> ImportError: cannot import name MAXREPEAT
> # I have found a way to work around this:
>
> gedit /usr/lib/ckan/default/lib/python2.7/sre_constants.py
> # from _sre import MAXREPEAT
> MAXREPEAT = 65535
> gedit /usr/lib/ckan/default/lib/python2.7/sre_parse.py
> # from _sre import MAXREPEAT
> MAXREPEAT = 65535
> gedit /usr/lib/ckan/default/lib/python2.7/sre_compile.py
> # from _sre import MAXREPEAT
> MAXREPEAT = 65535
>
> # at this point I again try
>
> sudo ckan db init
>
> # and I now get the message:
>
> ImportError: No module named _csv
>
> # this is where I currently give up.
>
> Does anybody know what I should do? Thank you.
Hi,
the MAXREPEAT error indicates that the system Python and the
Python of the virtualenv of CKAN do not have the same version
number. Ubuntu 13.04 uses 2.7.4. I'm not quite sure how to fix
this in case of package install. With source install you could
just create a new virtualenv. It might be possible to simply
overwrite /usr/lib/ckan/default with a new virtualenv.
regards
hendrik
--
Dr. Hendrik Bunke
http://gplus.to/hbunke
http://twitter.com/hbunke
http://www.hbxt.org
_______________________________________________
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