google-research / smore

Apache License 2.0
162 stars 28 forks source link

problem while installing #3

Closed KeepYang closed 2 years ago

KeepYang commented 2 years ago

Thank you for your contribution. I'm trying to install this repository but met the following problem: ERROR: Command errored out with exit status 1: src/lib/edge_sampler.cpp:16:24: fatal error: ThreadPool.h: no such file or directory how could I fix it?

hyren commented 2 years ago

Hi, you need to first run git submodule update --init before pip install. Please see the instructions here

KeepYang commented 2 years ago

Hi, you need to first run git submodule update --init before pip install. Please see the instructions here

Thank you. I tried this command but it didn't work. This is the whole error information:

Obtaining file:///home/yang/smore-main Installing collected packages: smore Running setup.py develop for smore ERROR: Command errored out with exit status 1: command: /home/yang/.conda/envs/torch19/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/yang/smore-main/setup.py'"'"'; file='"'"'/home/yang/smore-main/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: /home/yang/smore-main/ Complete output (23 lines): running develop g++ -Wall -O3 -std=c++11 -Wfatal-errors -I./include -I../../third_party/ThreadPool -fPIC -I/home/yang/.conda/envs/torch19/include/python3.7m -I/home/yang/.conda/envs/torch19/lib/python3.7/site-packages/pybind11/include -MMD -c -o build/lib/edge_sampler.o src/lib/edge_sampler.cpp src/lib/edge_sampler.cpp:16:24: fatal error: ThreadPool.h: no such file or directory compilation terminated. Makefile:61: recipe for target 'build/lib/edge_sampler.o' failed make: * [build/lib/edge_sampler.o] Error 1 Traceback (most recent call last): File "", line 1, in File "/home/yang/smore-main/setup.py", line 68, in 'develop': custom_develop, File "/home/yang/.conda/envs/torch19/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(attrs) File "/home/yang/.conda/envs/torch19/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/home/yang/.conda/envs/torch19/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/yang/.conda/envs/torch19/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/yang/smore-main/setup.py", line 54, in run subprocess.check_call(['make']) File "/home/yang/.conda/envs/torch19/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.

ERROR: Command errored out with exit status 1: /home/yang/.conda/envs/torch19/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/yang/smore-main/setup.py'"'"'; file='"'"'/home/yang/smore-main/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

Besides, my cuda version is 11.1.

Hanjun-Dai commented 2 years ago

Hi,

After running git submodule update --init, can you verify that ThreadPool.h is under third_party/ThreadPool folder?

KeepYang commented 2 years ago

Hi,

After running git submodule update --init, can you verify that ThreadPool.h is under third_party/ThreadPool folder?

I have checked that folder, but there is no such file.

hyren commented 2 years ago

Can you print the output of git submodule update --init on your end?

KeepYang commented 2 years ago

Can you print the output of git submodule update --init on your end?

That's it. I searched the git submodule command and found that there is no ThreadPool downloaded into thirdparty folder, so I download it manually. Thanks for your help.