代码之家  ›  专栏  ›  技术社区  ›  Zahra

火炬名称错误:未定义名称'\u C'

  •  0
  • Zahra  · 技术社区  · 7 年前

    当我试图 import torch 在朱庇特:

    ---------------------------------------------------------------------------
    NameError                                 Traceback (most recent call last)
    <ipython-input-10-39178> in <module>
          1 
    ----> 2 import torch
    
    ~/jupyter_py3/lib/python3.6/site-packages/torch/__init__.py in <module>
         84 from torch._C import *
         85 
    ---> 86 __all__ += [name for name in dir(_C)
         87             if name[0] != '_' and
         88             not name.endswith('Base')]
    
    NameError: name '_C' is not defined
    
    
         88             not name.endswith('Base')]
    
    NameError: name '_C' is not defined
    

    Cython 已经安装了,以防您怀疑。

    知道怎么解决吗?

    0 回复  |  直到 7 年前