Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/sampler.cpp:6:45: error: no member named 'getDefaultCPUGenerator' in namespace 'at::detail' #24

Closed
henrykenlay opened this issue Jun 18, 2019 · 1 comment

Comments

@henrykenlay
Copy link

Hey I'm trying to install this package on MacOS.

I tried pip install torch-cluster but I get 'gcc' failed with exit status 1. I had the same issues when installing torch-scatter and torch-sparse but using the fix given here allowed me to install those packages. The same fix doesn't seem to be working here and I'm unsure how to resolve the issue!

The command python -c "import torch; print(torch.__version__)" outputs 1.1.0 so it seems my PyTorch is up to date.

The stacktrace is given below.

kenlay@Henry-2:~/pytorch_cluster$ MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
running install
running bdist_egg
running egg_info
writing torch_cluster.egg-info/PKG-INFO
writing dependency_links to torch_cluster.egg-info/dependency_links.txt
writing requirements to torch_cluster.egg-info/requires.txt
writing top-level names to torch_cluster.egg-info/top_level.txt
reading manifest file 'torch_cluster.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'torch_cluster.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-x86_64/egg
running install_lib
running build_py
running build_ext
building 'torch_cluster.sampler_cpu' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/anaconda3/lib/python3.7/site-packages/torch/include -I/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/anaconda3/include/python3.7m -c cpu/sampler.cpp -o build/temp.macosx-10.7-x86_64-3.7/cpu/sampler.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sampler_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cpu/sampler.cpp:6:45: error: no member named 'getDefaultCPUGenerator' in namespace 'at::detail'
at::CPUGenerator *generator = at::detail::getDefaultCPUGenerator();
~~~~~~~~~~~~^
1 error generated.
error: command 'clang' failed with exit status 1

Thanks

@rusty1s
Copy link
Owner

rusty1s commented Jun 18, 2019

Hi, you need to install from PyPi or from commit f7e9e8f. The current master version only works on PyTorch nightly.

@rusty1s rusty1s closed this as completed Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants