Dear Greg and RDKitters ,
I try to follow your instruction to install python3-rdkit on my laptop
(Ubuntu 16.04).
But I got the following error information:
"../../../lib/libRDKitFilterCatalog.so.1.2018.09.1dev1: undefined reference
to
`boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load_override(boost::archive::class_name_type&)'
../../../lib/libRDKitFilterCatalog.so.1.2018.09.1dev1: undefined reference
to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception
const&)'
collect2: error: ld returned 1 exit status
Code/GraphMol/FilterCatalog/CMakeFiles/filterCatalogTest.dir/build.make:116:
recipe for target 'Code/GraphMol/FilterCatalog/filterCatalogTest' failed
make[2]: *** [Code/GraphMol/FilterCatalog/filterCatalogTest] Error 1
CMakeFiles/Makefile2:5415: recipe for target
'Code/GraphMol/FilterCatalog/CMakeFiles/filterCatalogTest.dir/all' failed
"
It looks like that the error is related to BOOST.
I can install the python2-rdkit successfully. The default python is python2
on my computer.
And the default BOOST is also compiled with python2.
I also try to recompile local boost with python3, but still get that error.
Has anyone successfully compiled python3-rdkit?
Many thanks for your help.
Best Regards,
Changge
On Tue, Jul 24, 2018 at 12:52 PM, Greg Landrum <[email protected]>
wrote:
> Hi Alfredo,
>
> I have previously used this dockerfile;
> https://github.com/rdkit/rdkit_containers/blob/master/
> docker/ubuntu_xenial/Dockerfile
> to build the RDKit with the Ubuntu-supplied python3 on Ubuntu 16.04.
>
> Even if you aren't using docker, it shows which packages need to be
> installed and how to invoke cmake in order to get a working build.
>
> And, yes, you need a version of the boost-python library that matches the
> version of python you are using.
>
> I hope this helps,
> -greg
>
>
> On Mon, Jul 23, 2018 at 7:43 PM Alfredo Quevedo <[email protected]>
> wrote:
>
>> 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
>>
>
> ------------------------------------------------------------
> ------------------
> 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
>
>
------------------------------------------------------------------------------
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