rusty1s / pytorch_spline_conv

Implementation of the Spline-Based Convolution Operator of SplineCNN in PyTorch
https://arxiv.org/abs/1711.08920
MIT License
172 stars 36 forks source link

How can I install in Google Colab? #7

Closed haozhen315 closed 5 years ago

haozhen315 commented 5 years ago

Hi, I tried to install in Google Colab but met this error:

Collecting torch_spline_conv Using cached https://files.pythonhosted.org/packages/3c/dd/daa9d0b7b2ede913e573876ae286a58ec296678858f2814ff6d6789b234f/torch_spline_conv-1.1.0.tar.gz Building wheels for collected packages: torch-spline-conv Building wheel for torch-spline-conv (setup.py) ... error ERROR: Failed building wheel for torch-spline-conv Running setup.py clean for torch-spline-conv Failed to build torch-spline-conv Installing collected packages: torch-spline-conv Running setup.py install for torch-spline-conv ... error ERROR: Command "/usr/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-xtch8f9o/torch-spline-conv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-af37x1z8/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-xtch8f9o/torch-spline-conv/

How can I solve it?

! echo $PATH /usr/local/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin:/opt/bin:/usr/local/cuda/bin:/usr/local/cuda/bin

! echo $CPATH [empty]

rusty1s commented 5 years ago

I am not exactly sure. Can you try installing from source?

haozhen315 commented 5 years ago

Hi, Thank you to your reply. Yes I tried but failed:

! python /content/drive/pytorch_spline_conv-master/setup.py test ... -> error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Do you know how to solve this? Thanks!

rusty1s commented 5 years ago

Can you post the complete log? This is sadly not enough information to help you.

haozhen315 commented 5 years ago

Yes!

running test Searching for pytest-cov Best match: pytest-cov 2.7.1 Processing pytest_cov-2.7.1-py3.6.egg

Using /content/.eggs/pytest_cov-2.7.1-py3.6.egg Searching for coverage>=4.4 Best match: coverage 5.0a4 Processing coverage-5.0a4-py3.6-linux-x86_64.egg

Using /content/.eggs/coverage-5.0a4-py3.6-linux-x86_64.egg running egg_info writing torch_spline_conv.egg-info/PKG-INFO writing dependency_links to torch_spline_conv.egg-info/dependency_links.txt writing top-level names to torch_spline_conv.egg-info/top_level.txt reading manifest file 'torch_spline_conv.egg-info/SOURCES.txt' writing manifest file 'torch_spline_conv.egg-info/SOURCES.txt' running build_ext building 'torch_spline_conv.basis_cpu' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/include/python3.6m -c cpu/basis.cpp -o build/temp.linux-x86_64-3.6/cpu/basis.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=basis_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 x86_64-linux-gnu-gcc: error: cpu/basis.cpp: No such file or directory x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

rusty1s commented 5 years ago
x86_64-linux-gnu-gcc: error: cpu/basis.cpp: No such file or directory

I wonder why the compiler does not find this file. Doesn't it exist?

haozhen315 commented 5 years ago

Yes that's a stupid error. Thank you for pointing out! I have changed the directory and installed it successfully! Thank you.