question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build pytorch_scatter in MacOS 10.13

See original GitHub issue

I have used MACOSX_DEPLOYMENT_TARGET=10.13.6 CC=clang CXX=clang++ python setup.py install to install pytorch_scatter, but failed, here is the information of my system and log. Please help me to solve this problem, I want to use it to implement GNN in my paper.

Ps: I also used gcc, but still falied.

System

  • OS: MacOS 10.13.6
  • PyTorch version: 1.1.0
  • How you installed PyTorch (conda, pip, source): source
  • Python version: Anaconda python 3.6.4
  • CUDA/cuDNN version: CUDA 10.1
  • GPU models and configuration: GeForce GTX 1080
  • GCC version (if compiling from source): Apple LLVM version 10.0.0 (clang-1000.10.44.4)

Log

MACOSX_DEPLOYMENT_TARGET=10.13.6 CC=clang CXX=clang++ python setup.py install running install running bdist_egg running egg_info writing torch_scatter.egg-info/PKG-INFO writing dependency_links to torch_scatter.egg-info/dependency_links.txt writing top-level names to torch_scatter.egg-info/top_level.txt reading manifest file ‘torch_scatter.egg-info/SOURCES.txt’ reading manifest template ‘MANIFEST.in’ writing manifest file ‘torch_scatter.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_scatter.scatter_cuda’ extension clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/kiwee/anaconda3/include -arch x86_64 -I/Users/kiwee/anaconda3/include -arch x86_64 -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/TH -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/Users/kiwee/anaconda3/include/python3.6m -c cuda/scatter.cpp -o build/temp.macosx-10.7-x86_64-3.6/cuda/scatter.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cuda -std=c++11 /usr/local/cuda/bin/nvcc -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/TH -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/Users/kiwee/anaconda3/include/python3.6m -c cuda/scatter_kernel.cu -o build/temp.macosx-10.7-x86_64-3.6/cuda/scatter_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options ‘-fPIC’ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cuda -std=c++11 /Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/util/UniqueVoidPtr.h(69): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/Allocator.h(96): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(175): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(185): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(194): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(199): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(206): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(221): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(228): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(235): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/util/UniqueVoidPtr.h(69): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/Allocator.h(96): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(175): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(185): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(194): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(199): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(206): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(221): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(228): warning: attribute namespace “clang” is unrecognized

/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(235): warning: attribute namespace “clang” is unrecognized

clang++ -bundle -undefined dynamic_lookup -L/Users/kiwee/anaconda3/lib -arch x86_64 -L/Users/kiwee/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/cuda/scatter.o build/temp.macosx-10.7-x86_64-3.6/cuda/scatter_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.macosx-10.7-x86_64-3.6/torch_scatter/scatter_cuda.cpython-36m-darwin.so ld: warning: directory not found for option ‘-L/usr/local/cuda/lib64’ ld: library not found for -lcudart clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command ‘clang++’ failed with exit status 1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rusty1scommented, Apr 28, 2019

As far as I know, MACOSX_DEPLOYMENT_TARGET should at least be set to 10.9. There should be no differences.

1reaction
oiwiocommented, Mar 13, 2019

@rusty1s Wow, it works!!! Thanks for your help and patience. I just use sudo ln -s /usr/local/cuda/lib /usr/local/cuda/lib64 , and install all packages with prefix MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++.

Read more comments on GitHub >

github_iconTop Results From Across the Web

build pytorch_scatter in MacOS 10.13 · Issue #116 - GitHub
I have used MACOSX_DEPLOYMENT_TARGET=10.13.6 CC=clang CXX=clang++ python setup.py install to install pytorch_scatter, but failed, ...
Read more >
How to Install Pytorch on MacOS? - GeeksforGeeks
Method 1: Using pip to install the required dependencies. ... Step 1: Check if python3 is already installed by entering the following command...
Read more >
torch.scatter — PyTorch 1.13 documentation
Built with Sphinx using a theme provided by Read the Docs. torch.scatter. Docs. Access ...
Read more >
torch-scatter - PyPI
This package consists of a small extension library of highly optimized sparse update (scatter and segment) operations for the use in PyTorch, which...
Read more >
Deep Learning with PyTorch
Our goal with PyTorch was to build the most flexible framework possible to express deep learning algorithms. We executed with focus and had...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found