Home > Development, Mac, Marsyas, Python > OSX: Getting Cmake to use a custom python framework

OSX: Getting Cmake to use a custom python framework

So I’m using a different python install from the one provided OEM in OSX by Apple. Specifically, I’m using Fink to get a more recent version of python 2.5 (but it could be MacPorts – the following problem would be the same).

Having python and swig installed in my osx box (both from Fink), I’m now trying to build the Marsyas library with python bindings, by means of swig, so that it becomes a python module I can use when coding in… er… python ;-).

The problem is that Cmake, when looking for the python installs and dependencies in my OSX box  (which it does when I activated the WITH_SWIG flag in Marsyas CMake build configuration), only looks for the python install provided by Apple in OSX (which is in fact a “framework” (in Apple sense) and not a library) and doesn’t know a thing about the Fink installed python (which lives in /sw/bin).

The result (and problem) is that if I start python (from Fink) and do “import marsyas”, it returns an error because that module was not in fact installed for it (it was installed for the Apple OEM python install, which I don’t want to use).

I found this blog where someone had a similar problem using Opencv ad Python and kind of fixed it, but I don’t find the proposed solution elegant and I’m still looking for less hacky fix to this issue.

Any suggestions?

Categories: Development, Mac, Marsyas, Python Tags: , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: