pytorch_structure2vec
pytorch_structure2vec copied to clipboard
error message when running python mol_lib.py
When I run
cd harvard_cep
python mol_lib.py
I got the following error:
Traceback (most recent call last): File "mol_lib.py", line 115, in
MOLLIB = _mol_lib() File "mol_lib.py", line 12, in init self.lib = ctypes.CDLL('%s/build/dll/libmol.so' % dir_path) File "/home/account/anaconda3/lib/python3.7/ctypes/init.py", line 356, in init self._handle = _dlopen(self._name, mode) OSError: /home/account/pytorch_structure2vec-master/harvard_cep/build/dll/libmol.so: undefined symbol: _ZN5RDKit17SmilesMolSupplierC1ERKSsS2_iibb
I think this issue is related with #2, but I can not solve this problem with the suggestion. I have tried to rebuilt rdkit and boost severl times, but the same error still incurs.
Thanks for help!
Hi,
Have you properly defined the LD_LIBRARY_PATH to include your rdkit lib?
Hi,
Yes, I set LD_LIBRARY_PATH as /home/account/boost/lib/:/home/account/rdkit/lib. Did I missing something needed?
If you built the rdkit by your own, did you do make install ?
Hi,
Yes, I did make install but still got the error.
I was wondering whether this is because of the boost library. I can not install the boost.python successfully in my home directory (1.65.1) successfully and thus another version of boost (in /usr/include/boost, 1.69.0) is also used in the process.
Thanks!
which version of rdkit are you using?
I am using Release_2019.03.1.
can you try Release_2017_09_2? that was the version I've tested.
I'll also try with new versions of rdkit later
Of course, will try and let you know later. Thanks a lot!
Another question: did you use miniconda or anaconda?
Hi,
I tried to install Release_2017_09_2 in the same cluster but it incurs an error during
cmake .. -DPy_ENABLE_SHARED=1 \
-DRDK_INSTALL_INTREE=ON \
-DRDK_INSTALL_STATIC_LIBS=OFF \
-DRDK_BUILD_CPP_TESTS=ON \
-DPYTHON_INCLUDE_DIR=$PYROOT/include/python3.7m \
-DBOOST_ROOT="/home/account/boost"
The error is
/home/account/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lboost_thread-mt
/home/account/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lboost_system-mt
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libRDKitRDGeneral.so.1.2017.09.1] Error 1
make[1]: *** [Code/RDGeneral/CMakeFiles/RDGeneral.dir/all] Error 2
It seems you don't have c++ boost installed?
I installed boost 1.65.1. With the same environment and the latest rdkit, I could install rdkit successfully but could not run mol_lib.py as mentioned in the top of this issue.
you need to make sure you have included boost libs in LD_LIBRARY_PATH
Yes, I have included the boost libs in LD_LIBRARY_PATH.
$ echo $LD_LIBRARY_PATH
/home/account/boost/lib/:/home/account/rdkit/lib:/usr/lib64