一行命令在Windows上安装GPU版mxnet

2020年10月9日

重点就是一句话:

conda install mxnet-gpu

参考Mxnet Gpu :: Anaconda Cloud

详细介绍

不要看mxnet官方安装指南

mxnet 1.7 GPU版官方安装指南

mxnet官方安装指南要求你事先自行安装CUDA,你需要自行解决CUDA版本和mxnet版本的对应问题。mxnet GPU版本装好后,import mxnet,容易抛出异常
Traceback (most recent call last):
File “”, line 1, in
File “C:.env38\lib\site-packages\mxnet_init_.py”, line 24, in from .context import Context, current_context, cpu, gpu, cpu_pinned
File “C:.env38\lib\site-packages\mxnet\context.py”, line 24, in from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
File “C:.env38\lib\site-packages\mxnet\base.py”, line 213, in _LIB = _load_lib()
File “C:.env38\lib\site-packages\mxnet\base.py”, line 204, in load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File “C:\Users\arnau\AppData\Local\Programs\Python\Python38\lib\ctypes_init.py”, line 373, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module ‘C:\env38\lib\site-packages\mxnet\libmxnet.dll’ (or one of its dependencies). Try using the full path with constructor syntax.

如果你按照乖乖虎. Windows 10 下安装Mxnet GPU版本. . 2019-11-14 [2020-10-10]. 装mxnet-cu80, mxnet-cu90等其他包,有可能pip抛出异常No matching distribution found。

如果你按照marleylee. Windows10下安装MXNet-走过的那些坑. . 2018-09-04 [2020-10-10].尝试编译mxnet gpu版,因为时过境迁,文章介绍的步骤可能已经不适用了,而且编译要安装不少工具不说,cmake可能抛出异常No CUDA toolset found。