当前位置: 代码迷 >> 综合 >> mxnet ubuntu18.04 python3.7.7 cuda10.1 AttributeError: module ‘mxnet‘ has no attribute xxx
  详细解决方案

mxnet ubuntu18.04 python3.7.7 cuda10.1 AttributeError: module ‘mxnet‘ has no attribute xxx

热度:31   发布时间:2023-12-15 16:30:26.0

报错:

$ python
Python 3.7.7 (default, Mar 26 2020, 15:48:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mxnet as mx
>>> mx.cpuAttributeError: module 'mxnet' has no attribute '__version__'>>> mx.__version__
>
AttributeError: module 'mxnet' has no attribute 'cpu'>>> from mxnet import nd
Traceback (most recent call last):File "<stdin>", line 1, in <module>
ImportError: cannot import name 'nd' from 'mxnet' (unknown location)

解决:
可能是mxnet损坏了,卸载然后 重装一下。

$ pip uninstall mxnet-cu101
$ pip install mxnet-cu101
  相关解决方案