Dear all,

I am trying to build RDKit from source under Ubuntu 16.04, on which I have both Python2.7 and Python3.5.2 installed. Followin the instructions provided in the RDKit book document I was able to build the module for the default Python version (2.7) and the 'import rdkit' command is ok. If I start Python3, and want to load the RDKit module I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fredy/Programas/RDkit/rdkit-master/rdkit/__init__.py", line 2, in <module>
    from .rdBase import rdkitVersion as __version__
ImportError: dynamic module does not define module export function (PyInit_rdBase)


I believe that I need to build RDKit configuring Python3 as the default interpreter? I read in the book that I need to indicate cmake the information related to the Python version I need to use, so I executed:

cmake -D PYTHON_LIBRARY=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/libpython3.5.so -D PYTHON_INCLUDE=/usr/include/python3.5m -D PYTHON_EXECUTABLE=/usr/bin/python3.5 ..

I typed 'make'

but after I while (36%) I am getting the following error:


[ 36%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,
                 from /usr/include/boost/python/args.hpp:8,
                 from /usr/include/boost/python.hpp:11,
                 from /home/fredy/Programas/RDkit/rdkit-master/Code/RDBoost/Wrap.h:20,                  from /home/fredy/Programas/RDkit/rdkit-master/Code/RDBoost/Wrap.cpp:15: /usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
compilation terminated.
Code/RDBoost/CMakeFiles/RDBoost.dir/build.make:62: recipe for target 'Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o' failed
make[2]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o] Error 1
CMakeFiles/Makefile2:1124: recipe for target 'Code/RDBoost/CMakeFiles/RDBoost.dir/all' failed
make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

Do I need to install a Boost package specifically for each Python version?

thank you very much in advance for the help,

regards

Alfredo





------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to