Hi Greg,

Greg Landrum <greg.land...@gmail.com> writes:

> One thing that may help is this (somewhat older, but I believe still 
> accurate) post from Riccardo:
> https://sourceforge.net/p/rdkit/mailman/message/30074971/
>
> It's been a while since I looked at this (since I mainly use conda these 
> days), but I just did a quick experiment with:
>
> mkdir build
> cd build
> cmake -DCMAKE_INSTALL_PREFIX=/opt/rdkit_test -DRDK_INSTALL_INTREE=OFF ..
>
> followed by
>
> make install
>
> and that seems to have worked.
>
> This type of install behaves somewhat differently from what the
> documentation describes. It arranges the files in the PREFIX directory
> like "normal" software is arranged. So as a user I need to set my
> PYTHONPATH like this:
>
> export PYTHONPATH=/opt/rdkit_test/lib/python3.5/site-packages
> and modify LD_LIBRARY_PATH to include: /opt/rdkit_test/lib
> RDBASE is:
> export RDBASE=/opt/rdkit_test/share/RDKit
>
> This is not documented in any useful way, which is something that we
> ought to change.

OK, I think I have got things mostly working.  The
-DRDK_INSTALL_INTREE=OFF seems to have been the main thing I was
missing.  Additionally I had to add some environment variables by hand
that cmake didn't pickup on, presumably because due to my having
multiple versions of Python installed.  This is what I did:

  export VERSION=2017_03_3
  export RDBASE=/home/BUILD/rdkit/rdkit-Release_${VERSION}
  export LD_LIBRARY_PATH=${RDBASE}:${LD_LIBRARY_PATH}

  source /cm/shared/apps/python27/enable

  export PYTHON_ROOT=/opt/rh/python27/root
  export CMAKE_INSTALL_PREFIX=/cm/shared/apps/rdkit/${VERSION}
  export PYTHON_INCLUDE_DIR=${PYTHON_ROOT}/usr/include/python2.7
  export PYTHON_LIBRARY=${PYTHON_ROOT}/usr/lib64/libpython2.7.so
  export 
PYTHON_NUMPY_INCLUDE_PATH=${PYTHON_ROOT}/usr/lib64/python2.7/site-packages/numpy/core/include

  cmake -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} \
        -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} \
        -DPYTHON_LIBRARY=${PYTHON_LIBRARY} \
        -DPYTHON_NUMPY_INCLUDE_PATH=${PYTHON_NUMPY_INCLUDE_PATH} \
        -DRDK_INSTALL_INTREE=OFF \
        ..

  make

  make install

When I did

  make test
  
some of the tests failed:

  61% tests passed, 46 tests failed out of 117

but most of the failures seemed to have been caused by

  ImportError: No module named rdkit

However, if I set up the user environment (we use modules:
http://modules.sourceforge.net/), I can import 'rdkit' without any
problem, so there must just be something I need to tweak before running
the tests.  Thus, apart from the outstanding 46 tests, I think I'm done.

Thanks for the help,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email loris.benn...@fu-berlin.de

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to