Import Error : import dgl

Used:
!conda install -c dglteam dgl-cuda10.2 to install dgl. Unable to import dgl.
What can be the problem?

Could you post full error messages? Also did you meet problem when installing ?

In the installation:
!conda install -c dglteam dgl-cuda10.2

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  • environment location: /usr/local*

  • added / updated specs:*

    • dgl-cuda10.2*

The following packages will be downloaded:

  • package | build*
  • ---------------------------|-----------------*
  • ca-certificates-2021.10.8 | ha878542_0 139 KB conda-forge*
  • certifi-2021.10.8 | py37h89c1867_1 145 KB conda-forge*
  • conda-4.11.0 | py37h89c1867_0 16.9 MB conda-forge*
  • decorator-4.4.2 | py_0 11 KB conda-forge*
  • dgl-cuda10.2-0.7.2 | py37_0 90.6 MB dglteam*
  • libblas-3.9.0 |11_linux64_openblas 12 KB conda-forge*
  • libcblas-3.9.0 |11_linux64_openblas 11 KB conda-forge*
  • libgfortran-ng-11.2.0 | h69a702a_11 19 KB conda-forge*
  • libgfortran5-11.2.0 | h5c6108e_11 1.7 MB conda-forge*
  • liblapack-3.9.0 |11_linux64_openblas 11 KB conda-forge*
  • libopenblas-0.3.17 |pthreads_h8fe5266_1 9.2 MB conda-forge*
  • networkx-2.5.1 | pyhd8ed1ab_0 1.2 MB conda-forge*
  • numpy-1.20.3 | py37h038b26d_1 5.7 MB conda-forge*
  • python_abi-3.7 | 2_cp37m 4 KB conda-forge*
  • scipy-1.5.3 | py37h14a347d_0 19.1 MB conda-forge*
  • ------------------------------------------------------------*
  •                                       Total:       144.8 MB*
    

The following NEW packages will be INSTALLED:

  • decorator conda-forge/noarch::decorator-4.4.2-py_0*
  • dgl-cuda10.2 dglteam/linux-64::dgl-cuda10.2-0.7.2-py37_0*
  • libblas conda-forge/linux-64::libblas-3.9.0-11_linux64_openblas*
  • libcblas conda-forge/linux-64::libcblas-3.9.0-11_linux64_openblas*
  • libgfortran-ng conda-forge/linux-64::libgfortran-ng-11.2.0-h69a702a_11*
  • libgfortran5 conda-forge/linux-64::libgfortran5-11.2.0-h5c6108e_11*
  • liblapack conda-forge/linux-64::liblapack-3.9.0-11_linux64_openblas*
  • libopenblas conda-forge/linux-64::libopenblas-0.3.17-pthreads_h8fe5266_1*
  • networkx conda-forge/noarch::networkx-2.5.1-pyhd8ed1ab_0*
  • numpy conda-forge/linux-64::numpy-1.20.3-py37h038b26d_1*
  • scipy conda-forge/linux-64::scipy-1.5.3-py37h14a347d_0*

The following packages will be UPDATED:

  • ca-certificates 2020.12.5-ha878542_0 → 2021.10.8-ha878542_0*
  • certifi 2020.12.5-py37h89c1867_1 → 2021.10.8-py37h89c1867_1*
  • conda 4.9.2-py37h89c1867_0 → 4.11.0-py37h89c1867_0*
  • python_abi 3.7-1_cp37m → 3.7-2_cp37m*

Downloading and Extracting Packages
liblapack-3.9.0 | 11 KB | : 100% 1.0/1 [00:00<00:00, 10.14it/s]
conda-4.11.0 | 16.9 MB | : 100% 1.0/1 [00:04<00:00, 4.01s/it]
*libopenblas-0.3.17 | 9.2 MB | : 100% 1.0/1 [00:01<00:00, 1.77s/it] *
libgfortran5-11.2.0 | 1.7 MB | : 100% 1.0/1 [00:00<00:00, 2.75it/s]
libblas-3.9.0 | 12 KB | : 100% 1.0/1 [00:00<00:00, 19.67it/s]
ca-certificates-2021 | 139 KB | : 100% 1.0/1 [00:00<00:00, 16.19it/s]
libgfortran-ng-11.2. | 19 KB | : 100% 1.0/1 [00:00<00:00, 21.25it/s]
*scipy-1.5.3 | 19.1 MB | : 100% 1.0/1 [00:03<00:00, 3.53s/it] *
libcblas-3.9.0 | 11 KB | : 100% 1.0/1 [00:00<00:00, 22.70it/s]
python_abi-3.7 | 4 KB | : 100% 1.0/1 [00:00<00:00, 22.69it/s]
dgl-cuda10.2-0.7.2 | 90.6 MB | : 100% 1.0/1 [00:23<00:00, 23.00s/it]
networkx-2.5.1 | 1.2 MB | : 100% 1.0/1 [00:00<00:00, 2.94it/s]
numpy-1.20.3 | 5.7 MB | : 100% 1.0/1 [00:01<00:00, 1.28s/it]
decorator-4.4.2 | 11 KB | : 100% 1.0/1 [00:00<00:00, 23.32it/s]
certifi-2021.10.8 | 145 KB | : 100% 1.0/1 [00:00<00:00, 13.70it/s]
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Once I import the dgl :

Are you using colab? How did you install conda? It seems your conda is not properly configured

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.