-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it easier to install the python driver. #1394
Comments
@AtnNn -- could you explain what the actual issue is? |
@coffemug sorry I pressed the wrong key. |
On Ubuntu 12.04 LTS That works (on a fresh VM)
|
Note: It was Ubuntu server -- even if it probably doesn't change anything And I still can't get it working on Arch :'( |
oh! okay ... the ubuntu apt package for python-protobuf has the cpp extension built. when i'm trying to install into a virtual environement, the pypi version of protobuf fails to build the cpp extension. and i get this:
I've also tried building building and installing the protobuf python extension from the protobuf source but to no avail. on the bright side i can use the cpp protobuf extension on my ubuntu desktop but, alas, still not from my gentoo server. |
@underrun on Ubuntu, these instructions should give you the python driver with the fast protobuf library:
|
Here are some of the steps that we used to get it to work on OS X:
We retried some of the steps 6 or 7 times in a different order or variation before getting the cpp backend to work. |
here's what i had to do to get it to work on gentoo:
|
Hum the instructions on Ubuntu works on a fresh VM, but I can't get them work on my server. |
Talked to @coffeemug -- here's what we decided to do.
|
That looks like an ugly workaround. |
@AtnNn that is unfortunate as I am almost certain that those who will want the "optimized backend" is 100% of your python users. performance and resource utilization on the python client side lag other nosql options like mongo even with the cpp version of protobuf. without it i just can't see how anyone who wants to use python as a primary interface is going to be interested in rethinkdb. with the cpp protobuf implementation, i feel like the tradeoffs are worth what i gain with rethinkdb, but it is a pain in the butt to build and install. you guys should take a look at zeromq for an example of how to bend pip to your will ( https://github.com/zeromq/pyzmq ). when installing the python bindings for zeromq, if the libraries are not detected on the system, they are actually built and installed as python extensions. this is by far the most powerful approach i've ever seen as it allows me to test different library version inside virtual environments without needing root access for anything. please put the effort into making this work with native python package installation even though packaging for python sucks. |
@underrun I will take a look at pyzmq |
@underrun -- we'll take a look at zeromq and make this work if we can. However, in our tests the cpp backend doesn't necessarily make that much difference in performance. We've put a lot of effort into improving performance by automatically using json instead of protobufs on insert, and will do the same for data coming back from the server. We'll look at other optimizations too -- unfortunately the cpp backend isn't a panacea for python driver performance problems. (We'll still make the install easy if we can, but not at the expense of confusing new users) |
The zeromq setup.py is 2/3 the size of the rethinkdb python driver. |
Ok, let's go with the original plan for now. |
In RethinkDB 1.11, the python driver will not build the C++ extension by default. It will only build the extension if the PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION environment variable is set to cpp, which is what the upstream protobuf library does. Detailed documentation for building the C++ implementation of the python protobuf library is being written: rethinkdb/docs#74 The current python driver can only build the C++ extension for protobuf 2.4. The new driver will also work with protobuf 2.5 The |
As seen in rethinkdb/rethinkdb-www#82, rethinkdb/rethinkdb-www#83 and #1284.
It might make many lives easier if there was an easy way to install the python driver and the python protobuf library with the C++ backend.
Doing so involves a lot of steps that are easy to get wrong. And currently the instructions we have only work with python 2 and protobuf 2.4
pip and setuptools are not intelligent enough to figure out the correct dependencies and execute the complicated build steps that are needed.
I'm going to write a script that would automate the installation, allowing users to possibly do
The text was updated successfully, but these errors were encountered: