installing couchapp python

609 views
Skip to first unread message

Andy Wenk

unread,
Jan 20, 2009, 11:13:03 AM1/20/09
to CouchApp
Hi everybody,

first it's amazing how fast this is growing here. Super cool ;-)

Actually I am really interested to install the couchapp python version
and read the post 'update of couchapp python'. I had a look to the
experiences Chris had and tried to follow.

$ git clone git://github.com/benoitc/couchapp.git

No problem with that. But then I had no luck:

$ cd couchapp
$ sudo python setup.py install
[sudo] password for duke:
Traceback (most recent call last):
File "setup.py", line 12, in <module>
from setuptools import setup
ImportError: No module named setuptools

$ python --version
Python 2.5.2

Ubuntu 8.04

Any idea what went wrong? This is not the same error Chris had. The
python part in INSTALLING.md is (surely) under construction so maybe I
can contribute to the doc when I successfully installed it.

Cheers

Andy

Jan Lehnardt

unread,
Jan 20, 2009, 11:23:37 AM1/20/09
to couc...@googlegroups.com

On 20 Jan 2009, at 17:13, Andy Wenk wrote:
>
> Any idea what went wrong? This is not the same error Chris had. The
> python part in INSTALLING.md is (surely) under construction so maybe I
> can contribute to the doc when I successfully installed it.

$ sudo easy_install setuptools

Cheers
Jan
--

Andy Wenk

unread,
Jan 20, 2009, 12:14:36 PM1/20/09
to CouchApp
I think you mean python-setuptools:

$ sudo apt-get install python-setuptools

Then:

$ cd couchapp
couchapp$ python setup.py install

Did not work because I had to update setuptools as mentioned by Chris
before.

Ok - I downloaded [1] and yeah it works ;-)

Now couchapp push:

couchapp$ sudo couchapp push . http://andy:password@localhost:5984/py
Traceback (most recent call last):
File "/usr/bin/couchapp", line 5, in <module>
pkg_resources.run_script('Couchapp==0.1.4', 'couchapp')
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 448,
in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1166,
in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/EGG-
INFO/scripts/couchapp", line 23, in <module>
import couchapp
File "/usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/
couchapp/__init__.py", line 11, in <module>
from couchapp.file_manager import FileManager
File "/usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/
couchapp/file_manager.py", line 28, in <module>
import json # Python 2.6
ImportError: No module named json

Hm - any idea what is wrong?

Cheers

Andy

[1] http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg#md5=fe67c3e5a17b12c0e7c541b7ea43a8e6

> Cheers
> Jan
> --

Benoit Chesneau

unread,
Jan 20, 2009, 12:32:18 PM1/20/09
to couc...@googlegroups.com
On Tue, Jan 20, 2009 at 6:14 PM, Andy Wenk <andy...@googlemail.com> wrote:

> ImportError: No module named json
>
> Hm - any idea what is wrong?


easy_install simplejson or if you use debian apt-get install python-simplejson.

- benoît

Chris Anderson

unread,
Jan 20, 2009, 3:21:06 PM1/20/09
to couc...@googlegroups.com
It looks like we have enough material in this thread to put together a
full python section in INSTALLING.md

Andy, if you even put together an unformatted sequential list of the
steps you took, I'd go through an verify them on a fresh machine, and
then drop them in the repository.

Or I can do it, but for now I'll concentrate on normalizing the
python/ruby behavior.
--
Chris Anderson
http://jchris.mfdz.com

Andy Wenk

unread,
Jan 21, 2009, 6:04:22 AM1/21/09
to CouchApp


On 20 Jan., 21:21, "Chris Anderson" <jch...@apache.org> wrote:
> It looks like we have enough material in this thread to put together a
> full python section in INSTALLING.md
>
> Andy, if you even put together an unformatted sequential list of the
> steps you took, I'd go through an verify them on a fresh machine, and
> then drop them in the repository.
>
> Or I can do it, but for now I'll concentrate on normalizing the
> python/ruby behavior.

That was my intention with starting this post. So I will test the
whole installing process and will write it down wellformed. I think I
have done that till tonight and will inform you by putting a post
here ...
Or ask more "hard questions" ;-)

Cheers

Andy

> On Tue, Jan 20, 2009 at 9:32 AM, Benoit Chesneau <bchesn...@gmail.com> wrote:

Andy Wenk

unread,
Jan 21, 2009, 6:15:52 AM1/21/09
to CouchApp
ok - here's another one:

ImportError: No module named couchdb

in /usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/couchapp/
file_manager.py

31 from couchdb import Server, ResourceNotFound

ChouchDB is up and running and placed in /usr/local/bin/couchdb

Got an idea? (benoît)

Thanks

Andy

Andy Wenk

unread,
Jan 21, 2009, 6:28:41 AM1/21/09
to CouchApp
On 20 Jan., 21:21, "Chris Anderson" <jch...@apache.org> wrote:
> Andy, if you even put together an unformatted sequential list of the
> steps you took, I'd go through an verify them on a fresh machine, and
> then drop them in the repository.

maybe not that important but shall I write the installation with
easy_install or apt-get ... or both (what is obviously the best way).
Then I would also explain how to get easy_install and so on ... I
don't know how much knowledge a user should have.Having not all python
tools was a pitfall for me. I think for many users would that probably
be the same ...

Cheers

Andy

>
> --
> Chris Andersonhttp://jchris.mfdz.com

Benoit Chesneau

unread,
Jan 21, 2009, 6:40:52 AM1/21/09
to couc...@googlegroups.com
On Wed, Jan 21, 2009 at 12:15 PM, Andy Wenk <andy...@googlemail.com> wrote:
>
> ok - here's another one:
>
> ImportError: No module named couchdb
>
> in /usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/couchapp/
> file_manager.py
>
> 31 from couchdb import Server, ResourceNotFound
>
> ChouchDB is up and running and placed in /usr/local/bin/couchdb
>
> Got an idea? (benoît)
>
> Thanks


You need couchdb-python installed. Should have been detected when installing ?
--
- benoît

Benoit Chesneau

unread,
Jan 21, 2009, 6:43:02 AM1/21/09
to couc...@googlegroups.com

easy_install is platform independant, I think it should be the
preferred way to install couchapp (when it will be on pipy that's it).
Apt* way could be described as another way when you use a debian based
system imo.

- benoît

Jan Lehnardt

unread,
Jan 21, 2009, 6:58:58 AM1/21/09
to couc...@googlegroups.com

Agreed, I'd not worry about distro-specific packaging.

Cheers
Jan
--

Andy Wenk

unread,
Jan 21, 2009, 7:00:05 AM1/21/09
to CouchApp


On 21 Jan., 12:40, Benoit Chesneau <bchesn...@gmail.com> wrote:
> You need couchdb-python installed. Should have been detected when installing ?

ouch ... ok that should fix it ...

> --
> - benoît

Cheers

Andy

Andy Wenk

unread,
Jan 21, 2009, 7:46:20 AM1/21/09
to CouchApp
hm - got still problems ...

I installed couchdb-python from here:

http://pypi.python.org/packages/2.6/C/CouchDB/CouchDB-0.5-py2.6.egg#md5=207349771ac7f7f0aad38298c6beff2c

~/couchapp_installs$ sudo easy_install CouchDB-0.5-py2.6.egg
[...]
Installed /usr/lib/python2.5/site-packages/httplib2-0.4.0-py2.5.egg
Finished processing dependencies for CouchDB==0.5

Is that the correct way to install couchdb-python?

$ couchapp push . http://andy:pa...@127.0.0.1:5984/py
Pushing CouchApp in /home/duke/couchapp_installs/couchapp to
http://andy:pa...@127.0.0.1:5984/py/_design/couchapp
Traceback (most recent call last):
File "/usr/bin/couchapp", line 5, in <module>
pkg_resources.run_script('Couchapp==0.1.4', 'couchapp')
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 448,
in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1166,
in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/EGG-
INFO/scripts/couchapp", line 104, in <module>
main()
File "/usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/EGG-
INFO/scripts/couchapp", line 84, in main
push(appdir, appname, dbstring)
File "/usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/EGG-
INFO/scripts/couchapp", line 45, in push
fm.push_app(appdir, appname)
File "/usr/lib/python2.5/site-packages/Couchapp-0.1.4-py2.5.egg/
couchapp/file_manager.py", line 174, in push_app
if docid in self.db:
File "build/bdist.macosx-10.5-i386/egg/couchdb/client.py", line 251,
in __contains__
File "build/bdist.macosx-10.5-i386/egg/couchdb/client.py", line 835,
in head
File "build/bdist.macosx-10.5-i386/egg/couchdb/client.py", line 869,
in _request
File "build/bdist.macosx-10.5-i386/egg/couchdb/client.py", line 864,
in _make_request
File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 1050,
in request

File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 854,
in _request

File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 827,
in _conn_request

httplib2.ServerNotFoundError: Unable to find the server at
andy:pa...@127.0.0.1


I saw that Dean had a similar problem with this "ServerNotFound" error
in the last line. But benoît fixed it ... I think. I have the actual
git installed
git clone git://github.com/benoitc/couchapp.git

Further ideas whats going wrong?

Thanks

Andy

Benoit Chesneau

unread,
Jan 21, 2009, 8:31:19 AM1/21/09
to couc...@googlegroups.com
On Wed, Jan 21, 2009 at 1:46 PM, Andy Wenk <andy...@googlemail.com> wrote:
>
> hm - got still problems ...
>
> I installed couchdb-python from here:
>
> http://pypi.python.org/packages/2.6/C/CouchDB/CouchDB-0.5-py2.6.egg#md5=207349771ac7f7f0aad38298c6beff2c
>
> ~/couchapp_installs$ sudo easy_install CouchDB-0.5-py2.6.egg
> [...]
> Installed /usr/lib/python2.5/site-packages/httplib2-0.4.0-py2.5.egg
> Finished processing dependencies for CouchDB==0.5
>
> Is that the correct way to install couchdb-python?

yes .

> httplib2.ServerNotFoundError: Unable to find the server at


> andy:pa...@127.0.0.1
>
>
> I saw that Dean had a similar problem with this "ServerNotFound" error
> in the last line. But benoît fixed it ... I think. I have the actual
> git installed
> git clone git://github.com/benoitc/couchapp.git
>
> Further ideas whats going wrong?
>


Are you using latest git (#7b5d9cdc849a8bfb28366f135a69efd0b47daf80)?

When I test :

pollen% couchapp push test http://benoitc:test@localhost:5984/test
Pushing CouchApp in /tmp/test to http://localhost:5984/test/_design/test

or
pollen% couchapp push . http://benoitc:test@localhost:5984/test
Pushing CouchApp in /tmp/test to http://localhost:5984/test/_design/test

it works here. Anyone could confirm ?

- benoît

Andy Wenk

unread,
Jan 21, 2009, 8:53:20 AM1/21/09
to CouchApp
On 21 Jan., 14:31, Benoit Chesneau <bchesn...@gmail.com> wrote:
> Are you using latest git (#7b5d9cdc849a8bfb28366f135a69efd0b47daf80)?

I I isntalled it again: git://github.com/benoitc/couchapp.git . So I
think this is the last version.

> When I test :
>
> pollen% couchapp push testhttp://benoitc:test@localhost:5984/test
> Pushing CouchApp in /tmp/test tohttp://localhost:5984/test/_design/test
>
> or
> pollen% couchapp push .http://benoitc:test@localhost:5984/test
> Pushing CouchApp in /tmp/test tohttp://localhost:5984/test/_design/test
>
> it works here. Anyone could confirm ?

tried it several times again but had no luck. Which info do you need
to figure out, if all depenencies ar correct?

> - benoît

Thanks

Andy

Benoit Chesneau

unread,
Jan 21, 2009, 9:53:50 AM1/21/09
to couc...@googlegroups.com
On Wed, Jan 21, 2009 at 2:53 PM, Andy Wenk <andy...@googlemail.com> wrote:
here. Anyone could confirm ?
>
> tried it several times again but had no luck. Which info do you need
> to figure out, if all depenencies ar correct?
>

Could you try to install python-couchdb from svn and tell me if it works ?:

svn checkout http://couchdb-python.googlecode.com/svn/trunk/ couchdb-python
cd couchdb-python && sudo python setup.py install

thanks for your feedback anyway :)

- benoît

Andy Wenk

unread,
Jan 21, 2009, 10:16:22 AM1/21/09
to CouchApp
On 21 Jan., 15:53, Benoit Chesneau <bchesn...@gmail.com> wrote:
> On Wed, Jan 21, 2009 at 2:53 PM, Andy Wenk <andy.w...@googlemail.com> wrote:
>
>  here. Anyone could confirm ?
>
>
>
> > tried it several times again but had no luck. Which info do you need
> > to figure out, if all depenencies ar correct?
>
> Could you try to install python-couchdb from svn and tell me if it works ?:
>
> svn checkouthttp://couchdb-python.googlecode.com/svn/trunk/couchdb-python
> cd couchdb-python && sudo python setup.py install

done

> thanks for your feedback anyway :)

thats my job here ;-)

I am not really sure if couchdb-python is running. I stopped / started
couchdb (/usr/local/etc/init.d/couchdb) after installing couchdb-
python from svn and had still the same error from above. Do I have to
start couchdb in a different way to get chochdb-python working? Sorry
- I did not engage myself with couchdb-python ...

Cheers

Andy
> - benoît

Benoit Chesneau

unread,
Jan 21, 2009, 10:36:42 AM1/21/09
to couc...@googlegroups.com
On Wed, Jan 21, 2009 at 4:16 PM, Andy Wenk <andy...@googlemail.com> wrote:
>
>> > tried it several times again but had no luck. Which info do you need
>> > to figure out, if all depenencies ar correct?
>>
>> Could you try to install python-couchdb from svn and tell me if it works ?:
>>
>> svn checkouthttp://couchdb-python.googlecode.com/svn/trunk/couchdb-python
>> cd couchdb-python && sudo python setup.py install
>
> done
>
same error ? I couldn't reproduce here :/ I will try to setup a clean
installation tonight but that's weird. Are you sure CouchDB have
authentification working ?

>
> I am not really sure if couchdb-python is running. I stopped / started
> couchdb (/usr/local/etc/init.d/couchdb) after installing couchdb-
> python from svn and had still the same error from above. Do I have to
> start couchdb in a different way to get chochdb-python working? Sorry
> - I did not engage myself with couchdb-python ...

Just start couchdb as usual and make sure urls you give to couchapp work.


- benoît

Andy Wenk

unread,
Jan 21, 2009, 11:04:03 AM1/21/09
to CouchApp
On 21 Jan., 16:36, Benoit Chesneau <bchesn...@gmail.com> wrote:
> same error ? I couldn't reproduce here :/ I will try to setup a clean
> installation tonight but that's weird. Are you sure CouchDB have
> authentification working ?

yes I am pretty sure - because otherwise I would not be able to call
http://localhost:5984/_utils/ -> Futon. Authentication is made vi
local.ini (/usr/local/etc/couchdb/local.ini)

> Just start couchdb as usual and make sure urls you give to couchapp work.

ok - I think then we (or I in special ;-) ) have another problem. I
will install everything also on another machine where actually nothing
concerning CouchDB is installed. I will give you my report asap.

Cheers

Andy

> - benoît

Benoit Chesneau

unread,
Jan 21, 2009, 11:51:31 AM1/21/09
to couc...@googlegroups.com
I just tested from a clean install (ie removed couchdb-python and
couchapp) then reinstalled. and everything worked using latest git and
latest couchapp.

pollen% sudo easy-install couchdb
pollen% sudo python setup.py install
pollen% cd /tmp
pollen% couchapp generate test
Generating a new CouchApp in /tmp/test
pollen% couchapp push test http://benoitc:te...@127.0.0.1:5984/okok
Pushing CouchApp in /tmp/test to http://127.0.0.1:5984/okok/_design/test
pollen% couchapp clone
http://benoitc:te...@127.0.0.1:5984/okok/_design/test coolest
pollen% ls coolest
_attachments foo lib show views

I would be curious what is wrong in your installation. Please tell me
if you reproduce the error.


- benoît

Andy Wenk

unread,
Jan 21, 2009, 5:54:20 PM1/21/09
to CouchApp


On 21 Jan., 17:51, Benoit Chesneau <bchesn...@gmail.com> wrote:
> I just tested from a clean install (ie removed couchdb-python and
> couchapp) then reinstalled. and everything worked using latest git and
> latest couchapp.
>
> pollen% sudo easy-install couchdb
> pollen% sudo python setup.py install
> pollen% cd /tmp
> pollen% couchapp generate test
> Generating a new CouchApp in /tmp/test
> pollen% couchapp push test http://benoitc:t...@127.0.0.1:5984/okok
> Pushing CouchApp in /tmp/test tohttp://127.0.0.1:5984/okok/_design/test
> pollen% couchapp clone
> http://benoitc:t...@127.0.0.1:5984/okok/_design/test coolest
> pollen% ls coolest
> _attachments foo          lib          show         views
>
> I would be curious what is wrong in your installation. Please tell me
> if you reproduce the error.

ok - I was testing on a new machine. Everything is working! I could
not reproduce the error. I will open a new post now with the manual I
wrote. There is a problem with installing sofa from jchris. I asked
him allready about that so let's see ...

Thanks for going trough this with me ;-)

Cheers

Andy

> - benoît

Benoit Chesneau

unread,
Jan 21, 2009, 6:04:41 PM1/21/09
to couc...@googlegroups.com
On Wed, Jan 21, 2009 at 11:54 PM, Andy Wenk

>> I would be curious what is wrong in your installation. Please tell me
>> if you reproduce the error.
>
> ok - I was testing on a new machine. Everything is working! I could
> not reproduce the error. I will open a new post now with the manual I
> wrote. There is a problem with installing sofa from jchris. I asked
> him allready about that so let's see ...
>
> Thanks for going trough this with me ;-)
>

Ouf :) thanks for the feedback. I just tried sofa tonight and it works
here. What you have to do is :

cd sofa
couch init
couch push blogdb

and that's it :)


- benoît

Benoit Chesneau

unread,
Jan 21, 2009, 6:05:35 PM1/21/09
to couc...@googlegroups.com
On Thu, Jan 22, 2009 at 12:04 AM, Benoit Chesneau

> cd sofa
> couch init
> couch push blogdb
>

s/couch/couchapp .... Time to sleep.

- benoît

Andy Wenk

unread,
Jan 21, 2009, 6:09:53 PM1/21/09
to CouchApp
:-)

I tested it and it orks just fine ;-) I will change that in the
manual.

Cool ;-)

Cheers

Andy
> - benoît
Reply all
Reply to author
Forward
0 new messages