Comments (15)
The error can be solved by "import torch" first!
for example:
import torch
from torch_sparse import spspmm
from pytorch_scatter.
I had this problem on Linux (Travis-CI actually) today, and it was solved by clearing the pip cache. Just leaving a note here on the off chance somebody else runs into this issue.
from pytorch_scatter.
@kwohlfahrt can you tell me how to clear pip cache in linux ubuntu?
rm -r ~/.cache/pip/
i just deleted pip cache, and reinstall torch_scatter. The problem was solved.
from pytorch_scatter.
I'm having the same problem on ubuntu 18.04, clearing the cache doesn't seem to help:
...
import torch_geometric.transforms as T
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/transforms/__init__.py", line 8, in <module>
from .point_pair_features import PointPairFeatures
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/transforms/point_pair_features.py", line 2, in <module>
from torch_geometric.nn.conv.ppf_conv import point_pair_features
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/nn/__init__.py", line 2, in <module>
from .data_parallel import DataParallel
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py", line 5, in <module>
from torch_geometric.data import Batch
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
from .data import Data
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/data/data.py", line 4, in <module>
from torch_geometric.utils import (contains_isolated_nodes,
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/utils/__init__.py", line 4, in <module>
from .dropout import dropout_adj
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_geometric/utils/dropout.py", line 2, in <module>
from torch_sparse import coalesce
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_sparse/__init__.py", line 2, in <module>
from .coalesce import coalesce
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_sparse/coalesce.py", line 4, in <module>
from .utils.unique import unique
File "/home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_sparse/utils/unique.py", line 5, in <module>
import torch_sparse.unique_cuda
ImportError: /home/piero/dev/meta-graph/mgvenv/lib/python3.6/site-packages/torch_sparse/unique_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail37_typeMetaDataInstance_preallocated_32E
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
from pytorch_scatter.
Your installation suggests that it does not recompile the kernels and is using a cached version instead. Please uninstall the packages first before reinstalling them:
pip uninstall torch-scatter torch-sparse
Run this command multiple times.
from pytorch_scatter.
Unfortunately I doubt it's a CUDA related issue, as I'm trying to run the same code from a Mac laptop without CUDA and get the same error:
Traceback (most recent call last):
File "main.py", line 8, in <module>
from data import load_dataset
File "/Users/piero/Development/mgraph/mgraph/data.py", line 8, in <module>
import torch_geometric.transforms as T
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_geometric/__init__.py", line 2, in <module>
import torch_geometric.nn
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_geometric/nn/__init__.py", line 2, in <module>
from .data_parallel import DataParallel
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_geometric/nn/data_parallel.py", line 5, in <module>
from torch_geometric.data import Batch
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
from .data import Data
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_geometric/data/data.py", line 7, in <module>
from torch_sparse import coalesce
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_sparse/__init__.py", line 2, in <module>
from .coalesce import coalesce
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_sparse/coalesce.py", line 2, in <module>
import torch_scatter
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_scatter/__init__.py", line 3, in <module>
from .mul import scatter_mul
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_scatter/mul.py", line 3, in <module>
from torch_scatter.utils.ext import get_func
File "/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_scatter/utils/ext.py", line 2, in <module>
import torch_scatter.scatter_cpu
ImportError: dlopen(/Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_scatter/scatter_cpu.cpython-37m-darwin.so, 2): Symbol not found: __ZN6caffe26detail37_typeMetaDataInstance_preallocated_29E
Referenced from: /Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_scatter/scatter_cpu.cpython-37m-darwin.so
Expected in: flat namespace
in /Users/piero/Development/mgraph/mgvenv/lib/python3.7/site-packages/torch_scatter/scatter_cpu.cpython-37m-darwin.so
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
If it is helpful, the python version is 3.7.3
Attatching the log for the installation of torch-sparse on MacOS:
log.txt
from pytorch_scatter.
Related to pyg-team/pytorch_geometric#18.
from pytorch_scatter.
@kwohlfahrt can you tell me how to clear pip cache in linux ubuntu?
from pytorch_scatter.
Can you show me the installation log of torch-sparse
? This also might indicate a mismatch of CUDA versions, so you should check this.
from pytorch_scatter.
Did it several time, also using --no-cache
, and also recreating a new environment. Had no luck unfortunately.
from pytorch_scatter.
Which gcc version are you using?
from pytorch_scatter.
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
from pytorch_scatter.
To be honest, I do not really know. macOS installation should run fine following pyg-team/pytorch_geometric#18 (comment) and https://twitter.com/xbresson/status/1154686843130011649?s=21. For Ubuntu, your error message sounds CUDA related, as it finds scatter_cpu, but not scatter_cuda.
from pytorch_scatter.
Not using conda unfortunately, both mac and ubuntu.
The version of gcc under ubuntu is 7.4.0 by the way, and cuda is 10.1
Anyway, thank you for your help, much appreciated.
from pytorch_scatter.
import torch
from torch_scatter import scatter_max
Traceback (most recent call last):
File "", line 1, in
File "/home/ahyun/anaconda3/envs/py36torch040/lib/python3.6/site-packages/torch_scatter/init.py", line 3, in
from .mul import scatter_mul
File "/home/ahyun/anaconda3/envs/py36torch040/lib/python3.6/site-packages/torch_scatter/mul.py", line 3, in
from torch_scatter.utils.ext import get_func
File "/home/ahyun/anaconda3/envs/py36torch040/lib/python3.6/site-packages/torch_scatter/utils/ext.py", line 2, in
import scatter_cpu
ImportError: /home/ahyun/anaconda3/envs/py36torch040/lib/python3.6/site-packages/scatter_cpu.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at6detail20DynamicCUDAInterface10set_deviceEI tried install w/ both pytorch v 0.4.0 and 0.4.1, via pip and source and get the same error How do I resolve this issue?
hey, guys
just do it in your conda env!
pip uninstall torch-sparse
pip install torch-sparse==0.6.0
not 0.6.12!
from pytorch_scatter.
Related Issues (20)
- Support for PyTorch 2.2 HOT 2
- Error with torch_scatter when compiling HOT 9
- sagfault in scatter_min with ROCM HOT 15
- missing macos arm wheels for pytorch 2.2 HOT 1
- undefined symbol: _ZN3c1017RegisterOperatorsD1Ev HOT 1
- ModuleNotFoundError: No module named 'torch' while installing torch-scatter using pip on MacOS HOT 3
- You should improve python version of pytorch_scatter HOT 2
- torch_scatter::cuda_version() -> int _0 with the same name and overload name multiple times HOT 2
- Installing Torch and Torch_Scatter with CUDA Support on AArch64 Devices: A Guide
- Unable to install torch_scatter with poetry HOT 1
- An issue occurred while importing 'torch-scatter'. HOT 4
- RuntimeError: CUDA error: an illegal memory access was encountered (for max and softmax) HOT 10
- A problem of install HOT 1
- Question about install C++ API HOT 3
- torch::jit::load error HOT 1
- OSError: dlopen.. when import torch_scatter HOT 9
- scatter_max bug: always return out-of-(upper)bound index, value associated with it is 0 HOT 2
- scatter or scatter_min fails when using torch.compile HOT 4
- failed to build with google-glog 0.7
- scatter_logsumexp broken for untouched outputs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch_scatter.