title: How to fix 'ImportError: /home/... .../lib/libtorch.so.1: undefined symbol: nvrtcGetProgramLogSize' in DGL?
body: <p>I get an error in the importation of pytorch inside dgl (Deep Graph Library by DeepMind), concretely:</p>
  
  <p>ImportError: /home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/torch/lib/libtorch.so.1: undefined symbol: nvrtcGetProgramLogSize</p>
  
  <p>I tried to reinstall pytorch (uninstall reinstall with <code>conda un/install</code>). I also search in google and I found this <a href="https://github.com/pytorch/pytorch/issues/14973" rel="noreferrer">https://github.com/pytorch/pytorch/issues/14973</a>. There, they solve it linking in <code>libnvrtc.so</code> and <code>libcuda.so</code>, but I have no idea what that means. Does anyone know it?</p>
  
  <p>This is the basic code:</p>
  
  <pre><code>import dgl
  from parseador import train_df
  
  g = dgl.DGLGraph()
  g.add_nodes(5)
  g.add_edges([0, 0, 0, 0], [1, 2, 3, 4])
  g.ndata['h'] = th.randn(5, 3)
  g.edata['h'] = th.randn(4, 4)
  </code></pre>
  
  <p>And this is the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/user/Documentos/Repo/grafos.py", line 1, in &lt;module&gt;
      import dgl
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/dgl/__init__.py", line 2, in &lt;module&gt;
      from . import function
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/dgl/function/__init__.py", line 5, in &lt;module&gt;
      from .message import *
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/dgl/function/message.py", line 7, in &lt;module&gt;
      from .. import backend as F
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/dgl/backend/__init__.py", line 46, in &lt;module&gt;
      load_backend(os.environ.get('DGLBACKEND', 'pytorch').lower())
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/dgl/backend/__init__.py", line 18, in load_backend
      mod = importlib.import_module('.%s' % mod_name, __name__)
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/dgl/backend/pytorch/__init__.py", line 1, in &lt;module&gt;
      from .tensor import *
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/dgl/backend/pytorch/tensor.py", line 5, in &lt;module&gt;
      import torch as th
    File "/home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/torch/__init__.py", line 102, in &lt;module&gt;
      from torch._C import *
  ImportError: /home/user/anaconda3/envs/my_env/lib/python3.7/site-packages/torch/lib/libtorch.so.1: undefined symbol: nvrtcGetProgramLogSize
  </code></pre>
  
  <p>How can I fix this error? some time ago I run correctly this code in Windows 10, now I'm running Ubuntu 18.04.</p>