为 cudnn 找到模块 'cudnn' 而不是 found:No LuaRocks 模块

Module 'cudnn' not found:No LuaRocks module found for cudnn

已按照 Ubuntu 16.04 上的标准命令安装 Lua 和其他依赖项:

conda install lua=5.2 lua-science -c alexbw

我在行中遇到错误:

require 'cudnn'

错误是: `

/home/parth/miniconda3/envs/fastai-tf/bin/lua: ...h/miniconda3/envs/fastai-tf/share/lua/5.2/trepl/init.lua:384: module 'cudnn' not found:No LuaRocks module found for cudnn
    no field package.preload['cudnn']
    no file '/home/ubuntu/.luarocks/share/lua/5.2/cudnn.lua'
    no file '/home/ubuntu/.luarocks/share/lua/5.2/cudnn/init.lua'
    no file '/home/parth/miniconda3/envs/fastai-tf/share/lua/5.2/cudnn.lua'
    no file '/home/parth/miniconda3/envs/fastai-tf/share/lua/5.2/cudnn/init.lua'
    no file '/home/parth/miniconda3/envs/fastai-tf/lib/lua/5.2/cudnn.lua'
    no file '/home/parth/miniconda3/envs/fastai-tf/lib/lua/5.2/cudnn/init.lua'
    no file './cudnn.lua'
    no file '/home/parth/.luarocks/share/lua/5.2/cudnn.lua'
    no file '/home/parth/.luarocks/share/lua/5.2/cudnn/init.lua'
    no file '/home/ubuntu/.luarocks/lib/lua/5.2/cudnn.so'
    no file '/home/parth/miniconda3/envs/fastai-tf/lib/lua/5.2/cudnn.so'
    no file '/home/parth/miniconda3/envs/fastai-tf/lib/lua/5.2/loadall.so'
    no file './cudnn.so'
    no file '/home/parth/.luarocks/lib/lua/5.2/cudnn.so'
stack traceback:
    [C]: in function 'error'
    ...h/miniconda3/envs/fastai-tf/share/lua/5.2/trepl/init.lua:384: in function 'require'
    src/train.lua:6: in main chunk
    [C]: in function 'dofile'
    ...da3/envs/fastai-tf/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: in ?

`

尝试使用命令 luarocks install cudnn 安装 cudnn,输出为:

Error: No results matching query were found.

如何解决此依赖性问题。

它也可以从 the alexbw channel 获得,所以如果您已经安装了 lua-science,只需

conda install -c alexbw lua-cudnn

如果您是从头开始安装,这似乎是一个非常专业的安装,所以我的建议是

conda create -n lua-sci -c alexbw lua=5.2 lua-science lua-cudnn

也就是给它新建一个环境