Python SDK Install Issue
I should preface this by saying I'm very much a designer rather than a programmer. Trying to change that but this is my first real attempt at doing anything as deep as to involve databases and Python. So please if you can offer help here it would be appreciated. Just remember the immortal words of Sarris from Galaxy Quest, "He doesn't understand. Explain as you would a child."
So here's where I'm at:
OS: Windows 7
I've so far installed Python 2.7.3, Couchbase Server 2, PyCharm IDE, and DJango. I sincerely hope installing the Couchbase Python SDK is the last thing that remains to do. However every time I try to run setup.py from Windows Command Prompt I get the following error:
C:\Python27> python C:\Python27\couchbase-python-client\setup.py build running build running build_py package init file 'C:\Python27\couchbase-python-client\couchbase\utils\__init__.py' not found (or not a regular file) package init file 'C:\Python27\couchbase-python-client\couchbase\utils\__init__.py' not found (or not a regular file)
And that is after commenting out the whole "def get_version()" bit in setup.py because that was giving me another error, namely:
C:\Python27>python C:\Python27\couchbase-python-client\setup.py build 'git' is not recognized as an internal or external command, operable program or batch file. running build running build_py error: package directory 'couchbase' does not exist
Should also note that I tried changing
packages = ["couchbase", "couchbase/httplib2", "couchbase/utils", "couchbase/migrator"]
...in setup.py to
packages = ["C:\Python27\couchbase-python-client\couchbase", etc..
...just to see if hard paths would fix the "package directory 'couchbase' does not exist" erorr, which then led to the
package init file 'C:\Python27\couchbase-python-client\couchbase\utils\__init__.py' not found (or not a regular file)
...error above. Basically I was pulling my hair out over this all day yesterday until giving up and playing some videos games I'm very good at to console myself.
Does anyone here know what I'm doing wrong here?
Thanks for the reply John. I'd originally gotten the file from this site. I tried the method you mentioned though just now with the same result. Frustrating to say the least, any other ideas on how to solve this?
Did you try using python26 to install & build?
Thanks for writing, Thestral. Sadly, our setup.py is in a sorry state... I'm working to fix that, but it's not done yet. Earlier versions, and I'd thought the ones listed for download on couchbase.com were installable via setup.py--there may be platform-specific issues.
I'll move getting setup.py working again up my stack of requests, and hopefully get you back on track.
Sorry for the trouble.
Thanks for getting back to me. After trying the python26 route suggested above (no dice but thanks fm) I'd basically given up hope. Good to hear that this is likely an issue with the setup.py rather than my brainmeats. Sadly this puts a big pause on my planned dive into Python as I'm looking to learn while building a site with CouchDB behind it. (Rather than start off with MySQL and then have to switch over when I'm ready for full scale production as A) I'm guessing that'd be a nightmare and B) I want to get a native feel for working with Couchbase).
Is there any way I can know when a fix for the set up file is made available? Something I could subscribe to or follow or somesuch?
Thestral,
Are you wanting to build something that uses CouchDB? or Couchbase? They're actually quite different. We've put up a comparison page at http://couchbase.com/couchdb
If you're going to use CouchDB, then you won't need this SDK as it's Couchbase specific. I'd recommend looking at http://couchdbkit.org/ for use with CouchDB.
However, if you're planning on using Couchbase, then I should have some good news here for you Real Soon Now™ as I'm hoping to cut the 0.7 release in the next day or so.
Additionally, you can follow progress on the SDK at http://github.com/couchbase/couchbase-python-client
Thanks for staying in touch, Thestral!
How did you obtain the source for installation? I'd suggest cloning the latest repository from GitHub - git clone https://github.com/couchbase/couchbase-python-client - and then running setup. I've recently installed the Python driver and had no problems.