Hanjun-Dai / pytorch_structure2vec

pytorch implementation of structure2vec (https://arxiv.org/abs/1603.05629)
MIT License
305 stars 76 forks source link

./include/mol_utils.h:5:31: fatal error: GraphMol/RingInfo.h: No such file or directory #1

Closed hunandhan closed 6 years ago

hunandhan commented 6 years ago

你好,我在运行 cd hardvard_cep
make -j4 出现了如下问题。 g++ -Wall -O3 -std=c++11 -I./include -I/Code -Wno-unused-local-typedef -fPIC -MMD -c -o build/lib/mol_utils.o src/lib/mol_utils.cpp
In file included from src/lib/mol_utils.cpp:1:0: ./include/mol_utils.h:5:31: fatal error: GraphMol/RingInfo.h: No such file or directory
compilation terminated.
Makefile:41: recipe for target 'build/lib/mol_utils.o' failed
make: *** [build/lib/mol_utils.o] Error 1

在此之前,运行cd s2v_lib make -j4没问题,并把export RDBASE=/usr/lib/python2.7/dist-packages/rdkit 添加到了/root/.bashrc中。

Hanjun-Dai commented 6 years ago

Hi there,

Is your rdkit built from source, or installed directly with pip?

As suggested in README, you need to build the c++ lib of https://github.com/rdkit/rdkit for now. I'll make a python lib later.

hunandhan commented 6 years ago

I installed the rdkit from source and it works! but when I run python main.py -gm mean_field -saved_model saved/mean_field.model -phase test there are other error happen. ====== begin of s2v configuration ====== | msg_average = 0 ====== end of s2v configuration ====== loading data train: 1900000 valid: 82601 test: 220289 loading model from saved/mean_field.model Traceback (most recent call last): File "main.py", line 117, in regressor.load_state_dict(torch.load(cmd_args.saved_model))
File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 261, in load return _load(f, map_location, pickle_module) File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 409, in _load result = unpickler.load() File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 380, in persistent_load data_type(size), location) File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 86, in default_restore_location result = fn(storage, location) File "/usr/local/lib/python2.7/dist-packages/torch/serialization.py", line 68, in _cuda_deserialize return obj.cuda(device) File "/usr/local/lib/python2.7/dist-packages/torch/_utils.py", line 61, in _cuda with torch.cuda.device(device): File "/usr/local/lib/python2.7/dist-packages/torch/cuda/init.py", line 186, in enter _lazy_init() File "/usr/local/lib/python2.7/dist-packages/torch/cuda/init.py", line 120, in _lazy_init _check_driver() File "/usr/local/lib/python2.7/dist-packages/torch/cuda/init.py", line 62, in _check_driver http://www.nvidia.com/Download/index.aspx""") AssertionError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
I run this code in a virtual machine,so I don't install NVIDIA driver.I changed cmd_opt.mode default='cpu' but error still happend.

Hanjun-Dai commented 6 years ago

Hi,

I've made a fix to support pytorch with CPU only. Please pull the latest version first.

Also, remember to set the command line args (add -mode cpu). So now you should try something like python main.py -gm mean_field -saved_model saved/mean_field.model -phase test -mode cpu

hunandhan commented 6 years ago

It works! Thank you very much!

feibu7 commented 6 years ago

@hunandhan 您好,方便留个联系方式吗,我也遇到了cd hardvard_cep make -j4这个问题。

hunandhan commented 6 years ago

你好,我之前遇到这个问题是环境配置没有配置好。当时的情况是自己直接pip下载的rdkit ,会爆错误。之后手动从源码安装了rdkit后就能成功运行了。

@hunandhan 您好,方便留个联系方式吗,我也遇到了cd hardvard_cep

make -j4这个问题。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Dora238 commented 2 years ago

你好,我之前遇到这个问题是环境配置没有配置好。当时的情况是自己直接pip下载的rdkit ,会爆错误。之后手动从源码安装了rdkit后就能成功运行了。 @hunandhan 您好,方便留个联系方式吗,我也遇到了cd hardvard_cep make -j4这个问题。 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the 请问您手动安装rdkit的流程是怎样的呢,我尝试各种方法安装失败,不知道问题在哪里。。

Dora238 commented 2 years ago

python main.py -gm mean_field -saved_model saved/mean_field.model -phase 你好,请问你的数据集怎么拿到的呀,国内好像无法访问dropbox网站