googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.18k stars 710 forks source link

ISSUE with import dgl package #4587

Open iro-akr opened 4 months ago

iro-akr commented 4 months ago

Describe the current behavior I've been running a certain code for three months now. Since yesterday, I can no longer import the package dgl. I get the error:


ImportError Traceback (most recent call last) in <cell line: 5>() 3 import torch 4 import torch.nn.functional as F ----> 5 import dgl 6 import time 7 from sklearn.neighbors import kneighbors_graph

---> 24 from torch.utils.data.datapipes.utils.common import _check_unpickable_fn, DILL_AVAILABLE 25 26 from torch.utils.data.graph import traverse_dps

ImportError: cannot import name 'DILL_AVAILABLE' from 'torch.utils.data.datapipes.utils.common'

What web browser you are using Chrome

uestcrbx commented 4 months ago

I would like to ask if there is a solution? I also have the same problem.

mayankmalik-colab commented 4 months ago

It seems like this may help.

iro-akr commented 4 months ago

It seems like this may help.

In colab, I use torch version 2.3.0 and cuda version 12.1, but when I go to install the updated version of DGL==2.2.1 I get this error: ERROR: Could not find a version that satisfies the requirement dgl==2.2.1 (from versions: 0.1.0, 0.1.2, 0.1.3, 0.8.0.post1, 0.9.0, 0.9.1, 1.0.0, 1.0.1, 1.0.4, 1.1.0, 1.1.1, 1.1.1, 1.1.2, 1.1.3, 2.1.0) ERROR: No matching distribution found for dgl==2.2.1

mayankmalik-colab commented 4 months ago

You many need to reach out to the package owner as I can see 2.2.1 on pypi - link . I don't think this is a Colab specific issue.

iro-akr commented 4 months ago

You many need to reach out to the package owner as I can see 2.2.1 on pypi - link . I don't think this is a Colab specific issue.

I think it's a colab issue. Since a few days ago, before colab update, I was running the code normally and could import the dgl package. After the update I couldn't import the package and there is no version 2.2.1 of dgl available for installation in colab.

mayankmalik-colab commented 4 months ago

Can you try using pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/cu121/repo.html . It is taken from here

iro-akr commented 4 months ago

Can you try using pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/cu121/repo.html . It is taken from here

Sorry to interrupt you. I installed it but now when I import the dgl it gives this error: ImportError: Cannot load Graphbolt C++ library And as I looked for it, they were mentioning problems with old versions of dgl, I couldn't find anything related to version 2.2.1 to solve it.

juggle-art commented 4 months ago

Can you try using pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/cu121/repo.html . It is taken from here

Sorry to interrupt you. I installed it but now when I import the dgl it gives this error: ImportError: Cannot load Graphbolt C++ library And as I looked for it, they were mentioning problems with old versions of dgl, I couldn't find anything related to version 2.2.1 to solve it.

i have the same question,have you found a solution to solve it?

AnnaVitali commented 4 months ago

It seems like this may help.

In colab, I use torch version 2.3.0 and cuda version 12.1, but when I go to install the updated version of DGL==2.2.1 I get this error: ERROR: Could not find a version that satisfies the requirement dgl==2.2.1 (from versions: 0.1.0, 0.1.2, 0.1.3, 0.8.0.post1, 0.9.0, 0.9.1, 1.0.0, 1.0.1, 1.0.4, 1.1.0, 1.1.1, 1.1.1, 1.1.2, 1.1.3, 2.1.0) ERROR: No matching distribution found for dgl==2.2.1

I also have the same problem.

shah-zeb-naveed commented 4 months ago

I faced the same issue when trying to run the official PyTorch guide on translation using transformer:

https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/c64c91cf87c13c0e83586b8e66e4d74e/translation_transformer.ipynb#scrollTo=8nrXuqUrfeH6

mushy2003 commented 3 months ago

Can you try using pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/cu121/repo.html . It is taken from here

Sorry to interrupt you. I installed it but now when I import the dgl it gives this error: ImportError: Cannot load Graphbolt C++ library And as I looked for it, they were mentioning problems with old versions of dgl, I couldn't find anything related to version 2.2.1 to solve it.

I have the exact same issue too. Has a fix or workaround been found for this yet?

AnnaVitali commented 3 months ago

I opened a specific issue about it, in which I was informed that for now only version 2.3.0 of Pytorch is supported

Waqas-dl commented 2 weeks ago

Can you try using pip install dgl -f https://data.dgl.ai/wheels/torch-2.3/cu121/repo.html . It is taken from here

Sorry to interrupt you. I installed it but now when I import the dgl it gives this error: ImportError: Cannot load Graphbolt C++ library And as I looked for it, they were mentioning problems with old versions of dgl, I couldn't find anything related to version 2.2.1 to solve it.

facing the issue