req-6ren">
gpt4 book ai didi

Lua 图像错误

转载 作者:行者123 更新时间:2023-12-04 21:20:18 24 4
gpt4 key购买 nike

我已经根据这个安装了 lua 镜像 - link .我还使用 luajit -limage -e "image.test()" 测试了我的安装它说 0 个错误和 0 个警告。另外,当我尝试

> 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 调用该函数将导致您面临的错误。

关于Lua 图像错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37652310/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com