lua – 要求(‘image’)在Torch7中不起作用

我用luarocks安装了’image’包

$luarocks  install image

一切都安装没有任何错误.每当我尝试使用它时,都会返回以下错误:

> th> require('image')
>
> /home/khurram/torch/install/share/lua/5.1/trepl/init.lua:384:
> /home/khurram/torch/install/share/lua/5.1/trepl/init.lua:384: module
> 'sys.fpath' not found:No LuaRocks module found for sys.fpath  no field
> package.preload['sys.fpath']  no file
> '/home/khurram/.luarocks/share/lua/5.1/sys/fpath.lua'     no file
> '/home/khurram/.luarocks/share/lua/5.1/sys/fpath/init.lua'    no file
> '/home/khurram/torch/install/share/lua/5.1/sys/fpath.lua'     no file
> '/home/khurram/torch/install/share/lua/5.1/sys/fpath/init.lua'    no
> file './sys/fpath.lua'    no file
> '/home/khurram/torch/install/share/luajit-2.1.0-beta1/sys/fpath.lua'
>   no file '/usr/local/share/lua/5.1/sys/fpath.lua'    no file
> '/usr/local/share/lua/5.1/sys/fpath/init.lua'     no file
> '/home/khurram/.luarocks/lib/lua/5.1/sys/fpath.so'    no file
> '/home/khurram/torch/install/lib/lua/5.1/sys/fpath.so'    no file
> '/home/khurram/torch/install/lib/sys/fpath.so'    no file
> './sys/fpath.so'  no file '/usr/local/lib/lua/5.1/sys/fpath.so'   no
> file '/usr/local/lib/lua/5.1/loadall.so'  no file
> '/home/khurram/.luarocks/lib/lua/5.1/sys.so'  no file
> '/home/khurram/torch/install/lib/lua/5.1/sys.so'  no file
> '/home/khurram/torch/install/lib/sys.so'  no file './sys.so'  no file
> '/usr/local/lib/lua/5.1/sys.so'   no file
> '/usr/local/lib/lua/5.1/loadall.so' stack traceback:  [C]: in function
> 'error'   /home/khurram/torch/install/share/lua/5.1/trepl/init.lua:384:
> in function 'require'     [string "_RESULT={require "image"}"]:1: in main
> chunk     [C]: in function 'xpcall'
>   /home/khurram/torch/install/share/lua/5.1/trepl/init.lua:651: in
> function 'repl'
>   ...rram/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in
> main chunk    [C]: at 0x00406670

有人可以帮帮我吗?我是Torch7&的新手LUA.

PS:我正在运行Ubuntu 14.04,并根据官方说明安装了Torch7,其他一切正常.

解决方法

遇到同样的问题.干

luarocks install sys

同样适合我.不确定使用映像安装sys发生了什么.

相关文章

1.github代码实践源代码是lua脚本语言,下载th之后运行thmai...
此文为搬运帖,原帖地址https://www.cnblogs.com/zwywilliam/...
Rime输入法通过定义lua文件,可以实现获取当前时间日期的功能...
localfunctiongenerate_action(params)localscale_action=cc...
2022年1月11日13:57:45 官方:https://opm.openresty.org/官...
在Lua中的table(表),就像c#中的HashMap(哈希表),key和...