Clarity on Python version for Ocean
Closed this issue · 4 comments
Hi all,
I've just finished installing all dependencies and databases for OCEAN on a fresh and clean Ubuntu build. Please note, I've done all installation and postgresql inside a conda environment.
Unfortunately, when I execute python manage.py syncdb
I get the error:
.....
ModuleNotFoundError: No module named 'SimilarityMaps'
I fixed this by replacing the line import SimilarityMaps as SM
in settings.py with:
from rdkit.Chem.Draw import SimilarityMaps as SM
I then ended up with a SyntaxError: invalid syntax for a line with an old print statement print "loaded {0}....
.
Only based on my experience, this error is associated with old code written in Python2.* - yet I can't find on the git page what version of Python I should be using. Is the latest python ok to use, or redo everything in python2?
Update
I cleaned everything off the machine and started again but this time with Python2.7.
Unfortunately, now I end up with the error: ImportError: No module named ocean.settings when I execute python manage.py synchdb
Hi Guido,
Thanks for the reply. I've started working on installing the older version of RDKit, but sadly it's having a issue finding boost (installed).
When running make I get the boost error:
6%] Building CXX object Code/DataStructs/Wrap/CMakeFiles/cDataStructs.dir/DataStructs.cpp.o
/home/anthony/RDKit/Code/DataStructs/Wrap/DataStructs.cpp:18:10: fatal error: boost/python/numeric.hpp: No such file or directory
#include <boost/python/numeric.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Code/DataStructs/Wrap/CMakeFiles/cDataStructs.dir/build.make:63: Code/DataStructs/Wrap/CMakeFiles/cDataStructs.dir/DataStructs.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2242: Code/DataStructs/Wrap/CMakeFiles/cDataStructs.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
My LD_LIBRARY_PATH is: /home/anthony/RDKit/lib:/home/anthony/anaconda3/envs/OCEAN27/lib/
My RDBASE is: /home/anthony/RDKit
I don't know if I've set the location of the boost library correctly. It's quite hard to make out where boost was installed. I ran a Linux find
and given that I'm inside a conda environment the above directory structure is my best guess (and it exists, of course).
During the cmake I see the following output:
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.39.0") found components: python
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.39.0") found components: regex
-- Configuring done
-- Generating done
-- Build files have been written to: /home/anthony/RDKit/build
I looked for boost/python/numeric.hpp and only found these files:
/home/anthony/boost_1_76_0/libs/hana/test/_include/support/numeric.hpp
/home/anthony/boost_1_76_0/libs/locale/src/util/numeric.hpp
/home/anthony/boost_1_76_0/boost/gil/image_processing/numeric.hpp
/home/anthony/boost_1_76_0/boost/lambda/numeric.hpp
/home/anthony/boost_1_76_0/boost/range/numeric.hpp
/home/anthony/boost_1_76_0/boost/spirit/home/x3/numeric.hpp
/home/anthony/boost_1_76_0/boost/spirit/home/karma/numeric.hpp
/home/anthony/boost_1_76_0/boost/spirit/home/qi/numeric.hpp
/home/anthony/boost_1_76_0/boost/safe_numerics/concept/numeric.hpp
/home/anthony/anaconda3/envs/OCEAN27/include/boost/lambda/numeric.hpp
/home/anthony/anaconda3/envs/OCEAN27/include/boost/range/numeric.hpp
/home/anthony/anaconda3/envs/OCEAN27/include/boost/spirit/home/x3/numeric.hpp
/home/anthony/anaconda3/envs/OCEAN27/include/boost/spirit/home/karma/numeric.hpp
/home/anthony/anaconda3/envs/OCEAN27/include/boost/spirit/home/qi/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.68.0-h11c811c_1000/include/boost/lambda/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.68.0-h11c811c_1000/include/boost/range/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.68.0-h11c811c_1000/include/boost/spirit/home/x3/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.68.0-h11c811c_1000/include/boost/spirit/home/karma/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.68.0-h11c811c_1000/include/boost/spirit/home/qi/numeric.hpp
/home/anthony/anaconda3/pkgs/libboost-1.67.0-h46d08c1_4/include/boost/lambda/numeric.hpp
/home/anthony/anaconda3/pkgs/libboost-1.67.0-h46d08c1_4/include/boost/range/numeric.hpp
/home/anthony/anaconda3/pkgs/libboost-1.67.0-h46d08c1_4/include/boost/spirit/home/x3/numeric.hpp
/home/anthony/anaconda3/pkgs/libboost-1.67.0-h46d08c1_4/include/boost/spirit/home/karma/numeric.hpp
/home/anthony/anaconda3/pkgs/libboost-1.67.0-h46d08c1_4/include/boost/spirit/home/qi/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.74.0-h312852a_4/include/boost/gil/image_processing/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.74.0-h312852a_4/include/boost/lambda/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.74.0-h312852a_4/include/boost/range/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.74.0-h312852a_4/include/boost/spirit/home/x3/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.74.0-h312852a_4/include/boost/spirit/home/karma/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.74.0-h312852a_4/include/boost/spirit/home/qi/numeric.hpp
/home/anthony/anaconda3/pkgs/boost-cpp-1.74.0-h312852a_4/include/boost/safe_numerics/concept/numeric.hpp
/usr/include/boost/gil/image_processing/numeric.hpp
/usr/include/boost/lambda/numeric.hpp
/usr/include/boost/range/numeric.hpp
/usr/include/boost/spirit/home/x3/numeric.hpp
/usr/include/boost/spirit/home/karma/numeric.hpp
/usr/include/boost/spirit/home/qi/numeric.hpp
/usr/include/boost/safe_numerics/concept/numeric.hpp
Any ideas? Or do you know whether there is a beautiful all in one installation file that holds all the dependencies for OCEAN to save me performing Linux surgery?
Many thanks
Anthony
Hi Guido,
Thank you very much for your help. I've decided to go down the MyChEMBL route, it's almost working, but even that on a fresh machine is facing issues. I'm going to start a new Issue related to the installation instruction.
Thanks for your help.
Anthony