我根据这个 – link安装了lua图像.我还用luajit -limage -e“image.test()”测试了我的安装,它说0错误和0警告.另外,当我尝试 require 'image' l = image.lena() 没有错误.但是,当我尝试image.display(l)时,我收
> require 'image' > l = image.lena()
没有错误.但是,当我尝试image.display(l)时,我收到以下错误:
/home/srilatha/torch/install/share/lua/5.1/trepl/init.lua:384: module 'qt' not found:No LuaRocks module found for qt no field package.preload['qt'] no file '/home/srilatha/.luarocks/share/lua/5.1/qt.lua' no file '/home/srilatha/.luarocks/share/lua/5.1/qt/init.lua' no file '/home/srilatha/torch/install/share/lua/5.1/qt.lua' no file '/home/srilatha/torch/install/share/lua/5.1/qt/init.lua' no file './qt.lua' no file '/home/srilatha/torch/install/share/luajit-2.1.0-beta1/qt.lua' no file '/usr/local/share/lua/5.1/qt.lua' no file '/usr/local/share/lua/5.1/qt/init.lua' no file '/home/srilatha/.luarocks/lib/lua/5.1/qt.so' no file '/home/srilatha/torch/install/lib/lua/5.1/qt.so' no file '/home/srilatha/torch/install/lib/qt.so' no file './qt.so' no file '/usr/local/lib/lua/5.1/qt.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' /home/srilatha/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require' /home/srilatha/torch/install/share/lua/5.1/image/init.lua:1363: in function 'display' [string "_RESULT={image.display(l)}"]:1: in main chunk [C]: in function 'xpcall' /home/srilatha/torch/install/share/lua/5.1/trepl/init.lua:651: in function 'repl' ...atha/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk [C]: at 0x00406670
我有火炬正常运行,所以我不知道qt会出现什么问题.我怎样才能解决这个问题?
你有没有机会读到这个?https://github.com/torch/image/blob/master/doc/gui.md
其他函数中的image.display只能通过qlua Lua解释器访问.
从LuaJit调用该函数将导致您遇到的错误.