rdkit / homebrew-rdkit

Homebrew formula for rdkit
44 stars 19 forks source link

Homebrew boost linked against wrong Python. (Fatal Python error: Interpreter not initialized (version mismatch?)) #2

Closed rwest closed 12 years ago

rwest commented 12 years ago

I was able to build rdkit fine but I had problems with the boost libraries having been built against a different Python.

When I tried python -c 'import rdkit.Chem' I got Fatal Python error: Interpreter not initialized (version mismatch?)

This is indicative of different libraries having been built against different versions of Python. I am using a 2.7.3 Framework build (brew install python --framework), and getting rdkit to link against this was the first issue (see #3), but the next problem was the "bottle" version of boost installed by default by brew install boost (or as a dependency of rdkit) is linked against the system python. To get rdkit to work I had to rebuild boost from source and have it link against the correct Python (the one I actually use, and the one I linked rdkit against):

brew uninstall boost
brew install boost --build-from-source

Then rebuild rdkit, and I was golden! (I think) Not sure what can be done to this rdkit formula, but I thought I'd report this in case the workaround helps other people.

sebeaumont commented 12 years ago

This caught me out too. Since boost is critial to my development I now install this by hand as brew neither has the latest version (1.50) nor builds it against the correct python (even though paths are all correctly set).

Please update the boost version and fix the install to use the python on the path.

edc commented 12 years ago

@sebeaumont Would you provide some instructions to reproduce your issue on a vanilla OS X system? I have a VM available for test.

sebeaumont commented 12 years ago

Apologies for confusion here: my issue is not with rdkit - it was a general issue with homebrew and boost. I think they have addressed this now. I wasn't aware of rdkit until today - so by coincidence it happens that we have very similar interests mine being machine learning, and the companies that I consult for are mainly molecular discovery/ix firms. I'll take a look at your stuff...

BTW I think there is now a formula for boost 1.50. I did an install with the submitted patch formula and built-from-source and now I am good with my boost python and my own extensions.