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.

-greg


On Fri, Sep 15, 2017 at 8:19 AM, Loris Bennett <loris.benn...@fu-berlin.de>
wrote:

>
> >  import rdkit
> >
> >  I get
> >
> >  ImportError: No module named rdkit
> >
> >  I am not a Python person and my naive expectation was that there should
> >  be a file called
> >
> >  rdkit.py
> >
> > Based on the info provided so far, there should be a directory called
> > rdkit in the directory: /cm/shared/apps/rdkit/rdkit_2017_03_3
>
> This directory exists.
>
> > That directory should contain a number of sub dirs, other files, and a
> > file called __init__.py (this is the one that tells Python that it can
> > import the directory as a package).  What do you see there?
>
> The directory just contains
>
>   lib
>   rdkit
>
> an nothing else, in particular, no __init__.py.  I have plenty of
> __init__.pys in the build directory, so I assume I must have done some
> thing wrong when running cmake and/or make install.
>
I must admit that I found the installation instructions somewhat unclear
> on that point.  I would find it clearer if things were couched in terms
> of 'source' and 'destination'.  For me, as a make-guy rather than a
> cmake-guy, it would also be helpful if it were made clearer at which
> point the destination directory should be specified.  I ended up with
> RDKit being installed under a very long path with included both my
> intended path and the original build path, so I had to move things
> around and may have goofed up at that point.
>
> >  which has to be on my PYTHONPATH. However, since the unpacked sources
> >  together with the build don't seem to contain such a file, either
> >  something is broken or the rdkit module should be found by some other
> >  mechanism.
> >
> > Again, based on the info above, I would expect that you want "make
> > install" to copy the "rdkit" and "lib" directories (as well as a
> > couple others) to /cm/shared/apps/rdkit/rdkit_2017_03_3. Once we
> > figure out what actually happened I can maybe help you figure out how
> > to fix it.
>
> This is what I did:
>
>   module add boost # this just sets the boost stuff up
>
>   export VERSION=2017_03_3
>   export RDBASE=/home/BUILD/rdkit/rdkit-rdkit-Release_${VERSION}
>   export LD_LIBRARY_PATH=${RDBASE}:${LD_LIBRARY_PATH}
>   export DESTDIR=/cm/shared/apps/rdkit/${VERSION}
>
> and then probably
>
>   cmake -DCMAKE_INSTALL_PREFIX=/cm/shared/apps/rdkit/${VERSION}
>
> so I may have over-egged my install-path-cake.  I started all the
> fiddling with DESTDIR and CMAKE_INSTALL_PREFIX, because my initial
> attempt resulted in the destination directory being the same as the
> build directory, which didn't work so well.
>
> Thanks for the help - I'll have another go Python 3.5 and try to keep my
> eye on __init__.py.
>
> Cheers,
>
> 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