Search code examples
pythonmesosmesosphere

How to install mesos.native python module in Mac OS and Ubuntu


I would like to write and run a Mesos framework with Python, so I need mesos.native module.

On Ubuntu:

I can build mesos from source code. I tried to easy_install all the generated egg files but none of them made it possible for Python to import mesos.native.

I also tried to download the egg from http://downloads.mesosphere.io/master/ubuntu/14.04/mesos-0.20.1-py2.7-linux-x86_64.egg and easy_install it, which didn't work as well.

On Max OS:

Got some problem building the mesos source code because of the issue. So I am wondering whether there is an easy way to install the Python module without building the source code.

BTW, why don't they make the mesos.native pip-installable like mesos.interface?


Solution

  • Problem solved: https://github.com/RobinDong/mesos-python-examples/blob/master/calculate_pi/pi_run

    I just need to set PYTHONPATH as that in the file and run python. Mesos.native can be successfully loaded.