Closed supern8ent closed 9 years ago
I think the virtualenv is the cause of this problem. As it stands, RDKit doesn't have very good support for virtualenvs. You can see in the cmake log:
-- Found PythonInterp: /Users/nathan/.virtualenvs/A0/bin/python (found version "2.7.6")
-- Found PythonLibs: /Users/nathan/.virtualenvs/A0/lib/libpython2.7.dylib (found version "2.7.6")
I don't think that libpython2.7.dylib
actually exists within each virtualenv? They use the lib in the main python installation.
Ideally RDKit could support virtualenvs by having a separate python package that could be installed with pip
that just installed the python language bindings into a virtualenv's site-packages
directory, with all virtualenvs just referring to a main RDKit installation. Open Babel manages this with its swig-based language bindings, but unfortunately I'm not sure if this is possible with boost-python.
In the meantime, this is how I handle RDKit with virtualenvs:
brew install rdkit
outside a virtualenv. This will install everything to /usr/local/Cellar/rdkit
, and RDKit should work in your main python install outside a virtualenv./usr/local/Cellar/rdkit/2014.09.2/lib/python2.7/site-packages
to /Users/nathan/.virtualenvs/A0/lib/python2.7/site-packages
. RDKit should then work within that virtualenv.You might also consider using Anaconda to create isolated Python environments instead of virtualenv: https://github.com/rdkit/conda-rdkit
Thanks mcs07! I was able to brew install/compile outside the virtualenv, then copy rdkit directory from cellar to virtualenv, and now I have working rdkit.Chem in python.
I encountered an error while installing rdkit via brew on osx 10.9.5. Here's what happened:
...some dependencies are installed, then
...
brew gist-logs rdkit: https://gist.github.com/a437c40ea71027f3d1a6
In case it matters, I use virtualenvwrapper and had one activated when I ran brew install rdkit