Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Loris Bennett
Greg Landrum  writes:

> On Fri, Sep 15, 2017 at 1:37 PM, Loris Bennett  
> wrote:
>
>  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
>
> Yeah, this is because you'd need to also setup the RDBASE, PYTHONPATH,
> and LD_LIBRARY_PATH variables for the account that's running ctest.

I think that is already correctly set up.  If I look at the first error:

  Command: "/opt/rh/python27/root/usr/bin/python" 
"/home/BUILD/rdkit/rdkit-Release_2017_03_3/Code/DataStructs/Wrap/testBV.py"
  Directory: 
/home/BUILD/rdkit/rdkit-Release_2017_03_3/build/Code/DataStructs/Wrap
  "pyBV" start time: Sep 15 12:55 CEST
  Output:
  --
  Traceback (most recent call last):
File 
"/home/BUILD/rdkit/rdkit-Release_2017_03_3/Code/DataStructs/Wrap/testBV.py", 
line 1, in 
  from rdkit import DataStructs
  ImportError: No module named rdkit

I can run this test directly and it succeeds:

  $ /opt/rh/python27/root/usr/bin/python 
/home/BUILD/rdkit/rdkit-Release_2017_03_3/Code/DataStructs/Wrap/testBV.py
  .
  --
  Ran 13 tests in 0.545s

  OK

So, strangely, it sort of looks as if part of the environment is being
overwritten when I run 'make test'.  However, I may have to leave this
for the time-being.  I'm sure the users will let me know if something is
still broken. 

[snip (7 lines)]

> If you have some time next Wed./Thurs. you should swing by the UGM
> during one of the breaks and say hi. :-)

Thanks, will do.

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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Greg Landrum
On Fri, Sep 15, 2017 at 1:37 PM, Loris Bennett 
wrote:

>
> 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
>

Yeah, this is because you'd need to also setup the RDBASE, PYTHONPATH, and
LD_LIBRARY_PATH variables for the account that's running ctest.



> 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.
>
>
Excellent. I'm glad to hear it. I hope things end up working now for your
users.

If you have some time next Wed./Thurs. you should swing by the UGM during
one of the breaks and say hi. :-)

-greg
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Loris Bennett
Hi Greg,

Greg Landrum  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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Greg Landrum
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 
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Greg Landrum
On Fri, Sep 15, 2017 at 9:12 AM, Loris Bennett 
wrote:

>
> Greg Landrum  writes:
>
> > I'll provide a more detailed answer in a bit, but since you aren't
> > using the system python anyway, is there any chance that you could
> > switch to anaconda python on your machines? Anaconda is a great python
> > distribution for scientific applications and it makes many things
> > (including system administration) a ton easier.
>
> Anaconda might be a possibility.  On the other hand we already have 3
> versions of Python in use: 2.6 from the OS, and 2.7 and 3.5 from the
> Software Collections.  In addition, the current cluster is nearing its
> end-of-life, probably before the end of the year and so I am somewhat
> loathe to install yet another one and add to my can of worms (or pit of
> snakes).
>

Got it. I figured I'd ask anyway. As you're thinking about/planning the new
cluster, it's really worth taking a look at using the anaconda distribution
to provide Python.


> However, now I have a slight handle on the problem and know that there
> is a responsive and helpful mailing list to back me up, I'm happy to
> invest a little more time in trying another source build.


A glutton for punishment! ;-)

-greg
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Markus Sitzmann
Well, if you have python 2.7 and 3.5 already running ,you can use
(mini)conda for the RDKit installation (conda is anaconda but instead of
one huge package you can install the packages you want including RDKit)

On Fri, Sep 15, 2017 at 9:12 AM, Loris Bennett 
wrote:

> Hi Greg,
>
> Greg Landrum  writes:
>
> > I'll provide a more detailed answer in a bit, but since you aren't
> > using the system python anyway, is there any chance that you could
> > switch to anaconda python on your machines? Anaconda is a great python
> > distribution for scientific applications and it makes many things
> > (including system administration) a ton easier.
>
> Anaconda might be a possibility.  On the other hand we already have 3
> versions of Python in use: 2.6 from the OS, and 2.7 and 3.5 from the
> Software Collections.  In addition, the current cluster is nearing its
> end-of-life, probably before the end of the year and so I am somewhat
> loathe to install yet another one and add to my can of worms (or pit of
> snakes).
>
> However, now I have a slight handle on the problem and know that there
> is a responsive and helpful mailing list to back me up, I'm happy to
> invest a little more time in trying another source build.
>
> 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
>
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Loris Bennett
Hi Greg,

Greg Landrum  writes:

> I'll provide a more detailed answer in a bit, but since you aren't
> using the system python anyway, is there any chance that you could
> switch to anaconda python on your machines? Anaconda is a great python
> distribution for scientific applications and it makes many things
> (including system administration) a ton easier.

Anaconda might be a possibility.  On the other hand we already have 3
versions of Python in use: 2.6 from the OS, and 2.7 and 3.5 from the
Software Collections.  In addition, the current cluster is nearing its
end-of-life, probably before the end of the year and so I am somewhat
loathe to install yet another one and add to my can of worms (or pit of
snakes).

However, now I have a slight handle on the problem and know that there
is a responsive and helpful mailing list to back me up, I'm happy to
invest a little more time in trying another source build.

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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Markus Sitzmann
BTW, python 3.6 is out since last Christmas ;-)   (and made it to
sub-release .2)

On Fri, Sep 15, 2017 at 8:36 AM, Greg Landrum 
wrote:

> I'll provide a more detailed answer in a bit, but since you aren't using
> the system python anyway, is there any chance that you could switch to
> anaconda python on your machines? Anaconda is a great python distribution
> for scientific applications and it makes many things (including system
> administration) a ton easier.
>
> -greg
>
>
> On Fri, Sep 15, 2017 at 8:19 AM, Loris Bennett  > wrote:
>
>> Hi Greg,
>>
>> Greg Landrum  writes:
>>
>> > Hi Loris,
>> >
>> > On Thu, Sep 14, 2017 at 2:25 PM, Loris Bennett <
>> loris.benn...@fu-berlin.de> wrote:
>> >
>> >  I am trying to install RDKit on a university cluster running Linux from
>> >  source. The build seem to go OK and 'make install' copied the
>> >  directories
>> >
>> >  lib
>> >  rdkit
>> >
>> >  to the NFS share where the software should reside. I then do
>> >
>> >  export RDBASE=/cm/shared/apps/rdkit/rdkit_2017_03_3
>> >  export PYTHONPATH=$PYTHONPATH:$RDBASE
>> >  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/lib
>> >
>> >  However when I then run Python (2.6.6) and try
>> >
>> > Just to do some expectation management: python 2.6 is pretty ancient
>> > and there's no guarantee that all of the RDKit code will work with
>> > it. Python 2.7 is the minimum version that we "officially"
>> > support. It's a very good idea to update.
>>
>> OK.  I didn't notice that 2.6 was deprecated - maybe this could be
>> explicitly mentioned in the install instructions.  I'm running the
>> RedHat clone Scientific Linux 6, so everything in this thread on
>> RH/Python applies.  So I can use either Python 2.7 or Python 3.5.  I can
>> ask the users what they prefer - although, as you seem know my users
>> here in Berlin, maybe you know too ;-)
>>
>> >  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! 

Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Greg Landrum
I'll provide a more detailed answer in a bit, but since you aren't using
the system python anyway, is there any chance that you could switch to
anaconda python on your machines? Anaconda is a great python distribution
for scientific applications and it makes many things (including system
administration) a ton easier.

-greg


On Fri, Sep 15, 2017 at 8:19 AM, Loris Bennett 
wrote:

> Hi Greg,
>
> Greg Landrum  writes:
>
> > Hi Loris,
> >
> > On Thu, Sep 14, 2017 at 2:25 PM, Loris Bennett <
> loris.benn...@fu-berlin.de> wrote:
> >
> >  I am trying to install RDKit on a university cluster running Linux from
> >  source. The build seem to go OK and 'make install' copied the
> >  directories
> >
> >  lib
> >  rdkit
> >
> >  to the NFS share where the software should reside. I then do
> >
> >  export RDBASE=/cm/shared/apps/rdkit/rdkit_2017_03_3
> >  export PYTHONPATH=$PYTHONPATH:$RDBASE
> >  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/lib
> >
> >  However when I then run Python (2.6.6) and try
> >
> > Just to do some expectation management: python 2.6 is pretty ancient
> > and there's no guarantee that all of the RDKit code will work with
> > it. Python 2.7 is the minimum version that we "officially"
> > support. It's a very good idea to update.
>
> OK.  I didn't notice that 2.6 was deprecated - maybe this could be
> explicitly mentioned in the install instructions.  I'm running the
> RedHat clone Scientific Linux 6, so everything in this thread on
> RH/Python applies.  So I can use either Python 2.7 or Python 3.5.  I can
> ask the users what they prefer - although, as you seem know my users
> here in Berlin, maybe you know too ;-)
>
> >  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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-15 Thread Loris Bennett
Hi Greg,

Greg Landrum  writes:

> Hi Loris,
>
> On Thu, Sep 14, 2017 at 2:25 PM, Loris Bennett  
> wrote:
>
>  I am trying to install RDKit on a university cluster running Linux from
>  source. The build seem to go OK and 'make install' copied the
>  directories
>
>  lib
>  rdkit
>
>  to the NFS share where the software should reside. I then do
>
>  export RDBASE=/cm/shared/apps/rdkit/rdkit_2017_03_3
>  export PYTHONPATH=$PYTHONPATH:$RDBASE
>  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/lib
>
>  However when I then run Python (2.6.6) and try
>
> Just to do some expectation management: python 2.6 is pretty ancient
> and there's no guarantee that all of the RDKit code will work with
> it. Python 2.7 is the minimum version that we "officially"
> support. It's a very good idea to update.

OK.  I didn't notice that 2.6 was deprecated - maybe this could be
explicitly mentioned in the install instructions.  I'm running the
RedHat clone Scientific Linux 6, so everything in this thread on
RH/Python applies.  So I can use either Python 2.7 or Python 3.5.  I can
ask the users what they prefer - although, as you seem know my users
here in Berlin, maybe you know too ;-)

>  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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Greg Landrum
On Thu, Sep 14, 2017 at 9:58 PM, Andrew Dalke 
wrote:

> On Sep 14, 2017, at 19:26, Dimitri Maziuk  wrote:
> > Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> > linux distros that will be officially with us until June 30, 2024.
>
> If only Greg got as much money for long term RDKit support as Red Hat
> gets for long term RHEL support. :)
>

I like the way Andrew thinks! :-)
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 03:04 PM, Markus Sitzmann wrote:
> Not on Centos 6 - Docker requires Centos 7 for the host system.

You can't win... :(

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Markus Sitzmann
Not on Centos 6 - Docker requires Centos 7 for the host system.

On Thu, Sep 14, 2017 at 10:01 PM, Dimitri Maziuk 
wrote:

> On 09/14/2017 02:58 PM, Andrew Dalke wrote:
>
> > If only Greg got as much money for long term RDKit support as Red Hat
> > gets for long term RHEL support. :)
>
> Yep. But an rdkit docker container might be feasible.
>
> --
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
>
>
> 
> --
> 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
>
>
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 02:58 PM, Andrew Dalke wrote:

> If only Greg got as much money for long term RDKit support as Red Hat
> gets for long term RHEL support. :)

Yep. But an rdkit docker container might be feasible.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Andrew Dalke
On Sep 14, 2017, at 19:26, Dimitri Maziuk  wrote:
> Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> linux distros that will be officially with us until June 30, 2024.

If only Greg got as much money for long term RDKit support as Red Hat
gets for long term RHEL support. :)


Andrew
da...@dalkescientific.com


--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Riccardo Vianello
On Thu, Sep 14, 2017 at 9:07 PM, Dimitri Maziuk 
wrote:

>
> All great when it's one computer and that one's your own personal laptop.
>
> > # yum ls \*python27\*
> > ...
> > python27.x86_642.7.13-2.ius.el6
>   @salt-2015.8
> > [...]...
>
> Any guesses as to how many things will break in my infrastructure
> manglement setup (saltstack) if I enable Software Collections and some
> of those get updated from SCL and some: from Salt?
>

sorry, I'm not familiar with saltstack, so I am unable to comment much. as
far as I understood, the RH software collection packages are meant to be
installed in parallel to the system software without overwriting any RHEL
package (it's not just an extension repository, users need to enable the
SCL packages to make them available in the runtime environment, similarly
to how virtualenvs are activated or environment modules are added), I don't
know how the saltstack packages are designed to work, so the discussion
would quickly go further off-topic (but I seem to understand it provides
yet another alternative to the system python, or not?)
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Greg Landrum
On Thu, Sep 14, 2017 at 7:26 PM, Dimitri Maziuk 
wrote:

> On 09/14/2017 10:43 AM, Greg Landrum wrote:
>
> > Just to do some expectation management: python 2.6 is pretty ancient and
> > there's no guarantee that all of the RDKit code will work with it. Python
> > 2.7 is the minimum version that we "officially" support. It's a very good
> > idea to update.
>
> Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> linux distros that will be officially with us until June 30, 2024.


Yep, but it's not supported by the python community (and hasn't been since
2013).
Newer versions of the RDKit no longer require backwards compatibility with
python 2.6. If you are stuck with an old version of Python, you may well be
stuck with an old version of the RDKit.

-greg
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 01:41 PM, Riccardo Vianello wrote:

> True, but there shouldn't be any strong need for using the system python
> for running application software. Python 2.7 (together with python 3) has
> been available to RHEL6 subscribers since almost five years, as part of the
> Red Hat Software Collections (also available to non-subscribers from the
> upstream CentOS/Fedora repositories). A detailed discussion is available
> from this post
> http://www.curiousefficiency.org/posts/2015/04/stop-supporting-python26.html
> 
> And the anaconda python distribution of course provides another alternative.

All great when it's one computer and that one's your own personal laptop.

> # yum ls \*python27\*
> ...
> python27.x86_642.7.13-2.ius.el6   
>  @salt-2015.8  
> python27-babel.noarch  0.9.4-5.2.el6  
>  @salt-2015.8  
> python27-chardet.noarch2.2.1-3.el6
>  @salt-2015.8  
> python27-crypto.x86_64 2.6.1-4.el6
>  @salt-2015.8  
> python27-futures.noarch3.0.3-2.el6
>  @salt-2015.8  
> python27-jinja2.noarch 2.8.1-2.el6
>  @salt-2015.8  
> python27-libs.x86_64   2.7.13-2.ius.el6   
>  @salt-2015.8  
> python27-markupsafe.x86_64 0.11-11.el6
>  @salt-2015.8  
> python27-msgpack.x86_640.4.6-2.el6
>  @salt-2015.8  
> python27-psutil.x86_64 5.2.2-1.ius.el6
>  @salt-2015.8  
> python27-pycurl.x86_64 7.19.0-10.el6  
>  @salt-2015.8  
> python27-requests.noarch   2.6.0-4.el6
>  @salt-2015.8  
> python27-six.noarch1.9.0-3.el6
>  @salt-2015.8  
> python27-tornado.x86_644.2.1-3.el6
>  @salt-2015.8  
> python27-urllib3.noarch1.10.2-2.el6   
>  @salt-2015.8  
> python27-zmq.x86_6414.5.0-3.el6   
>  @salt-2015.8  
...
> python27-babel.noarch  0.9.6-7.sc1.el6
>  centos-sclo-rh
> python27-pip.noarch9.0.1-1.ius.el6
>  salt-2015.8   
...
> python27-python.x86_64 2.7.13-3.el6   
>  centos-sclo-rh
> python27-python-babel.noarch   0.9.6-7.sc1.el6
>  centos-sclo-rh
> python27-python-jinja2.noarch  2.6-10.sc1.el6 
>  centos-sclo-rh
> python27-python-libs.x86_642.7.13-3.el6   
>  centos-sclo-rh
> python27-python-markupsafe.x86_64  0.11-11.sc1.el6
>  centos-sclo-rh
> python27-python-pip.noarch 8.1.2-1.el6
>  centos-sclo-rh
...

Any guesses as to how many things will break in my infrastructure
manglement setup (saltstack) if I enable Software Collections and some
of those get updated from SCL and some: from Salt?

And don't get me started on PIP.
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Riccardo Vianello
On Thu, Sep 14, 2017 at 7:26 PM, Dimitri Maziuk 
wrote:

> Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> linux distros that will be officially with us until June 30, 2024.
>

True, but there shouldn't be any strong need for using the system python
for running application software. Python 2.7 (together with python 3) has
been available to RHEL6 subscribers since almost five years, as part of the
Red Hat Software Collections (also available to non-subscribers from the
upstream CentOS/Fedora repositories). A detailed discussion is available
from this post
http://www.curiousefficiency.org/posts/2015/04/stop-supporting-python26.html

And the anaconda python distribution of course provides another alternative.

--Riccardo
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 10:43 AM, Greg Landrum wrote:

> Just to do some expectation management: python 2.6 is pretty ancient and
> there's no guarantee that all of the RDKit code will work with it. Python
> 2.7 is the minimum version that we "officially" support. It's a very good
> idea to update.

Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
linux distros that will be officially with us until June 30, 2024.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
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


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Greg Landrum
Hi Loris,

On Thu, Sep 14, 2017 at 2:25 PM, Loris Bennett 
wrote:

>
> I am trying to install RDKit on a university cluster running Linux from
> source.  The build seem to go OK and 'make install' copied the
> directories
>
>   lib
>   rdkit
>
> to the NFS share where the software should reside.  I then do
>
>   export RDBASE=/cm/shared/apps/rdkit/rdkit_2017_03_3
>   export PYTHONPATH=$PYTHONPATH:$RDBASE
>   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/lib
>
> However when I then run Python (2.6.6) and try
>

Just to do some expectation management: python 2.6 is pretty ancient and
there's no guarantee that all of the RDKit code will work with it. Python
2.7 is the minimum version that we "officially" support. It's a very good
idea to update.


>   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
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?



> 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.

best.
-greg



> Any ideas what I'm doing wrong or what initialisation file I should
> ensure is on my PYTHONPATH?
>
> 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
>
--
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