Jupiter kernel dies when importing pytorch geometric
See original GitHub issue🐛 Describe the bug
Hi everyone,
I have just installed PyTorch geometric in a virtual machine that is Linux Ubuntu, the virtual machine is on a CPU. I used the terminal to just install it and it gave me the message that the
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
pip install torch-sparse -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
pip install torch-geometric
However, when I launch anaconda and I use Jupiter, I just execute this snippet the kernel dies
import os
import torch
import matplotlib.pyplot as plt
from torch_geometric.datasets import Planetoid
from torch_geometric.transforms import NormalizeFeatures
However, I already use torch and it works ok, and apparently, it is PyTorch geometric that makes crash the kernel
Environment
- PyG version: the latest
- PyTorch version: 1.12.1
- OS:
- Python version: 3.7
- CUDA/cuDNN version: CPU
- How you installed PyTorch and PyG (
conda
,pip
, source): Terminal - Any other relevant information (e.g., version of
torch-scatter
):
Issue Analytics
- State:
- Created a year ago
- Comments:29 (11 by maintainers)
Top Results From Across the Web
PyTorch: The kernel appears to have died. It will restart ...
I have the same issue, i can start running python or ipython on the term and then import torch, but i can not...
Read more >The kernel appears to have died. It will restart automatically
I facing a common problem when loading pre-training model using PyTorch. Jupyter notebook is crashing “The kernel appears to have died.
Read more >How to fix 'The kernel appears to have died. It will restart ...
LibTorch; From Source. So you have multiple options. Go to this page and select Cuda to NONE, LINUX, stable 1.1, CONDA. conda install...
Read more >kernel dies when importing torch - You.com | The search engine you ...
pytorch/pytorchJupyter kernel dies when importing torch#2393 ... I have just installed PyTorch geometric in a virtual machine that is Linux Ubuntu, ...
Read more >The kernel appears to have died it will restart automatically
Jupyter notebook kernel keeps dying pytorch. Dead kernel The kernel has died, and the automatic restart has failed. It is possible the kernel...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was having the same issue - debugged through and the issue seems to be inside this line in the initialization of
pytorch_geometric/data/data.py
:from torch_sparse import SparseTensor
Tracing that through the root issue seems to be in
torch_sparse
callingtorch.ops.load_library(spec.origin)
, where spec.origin is/home/john/.local/lib/python3.10/site-packages/torch_sparse/_version_cuda.so
, and not quite sure how to decode that binary to debug further.In the end I just downgraded to Python 3.6 and installed via pip instead of conda and the issue didn’t seem to persist.
Import torch does not problem and I managed before to run a neural network with torch, so I have found weird this behaviour