Torch does not see qtlua.
mszlazak opened this issue · 5 comments
On Ubuntu 14.04 32-bit a couple issues come up with
luarocks install qtlua
First is looks for "anaconda1anaconda2anaconda3" which doesn't exist so the build fails. I did a symbolic link to Anaconda from 'anaconda1anaconda2anaconda3" and then the build worked.
However, whenever i do: require 'qtlua', th does not see it but qtlua is in the package table??
for using qtlua, start torch in your terminal with:
$ qlua
instead of
$ th
Thx. The issue with work around came up here before:
Is there any way to use qtlua without qlua?
I'm trying to add a file picker button to an iTorch notebook, and the obvious way to do this (since HTML <input type="file">
lets you read a file but doesn't give you the path) would be to use IPython.notebook.kernel.execute
to launch a QFileDialog
(only works if iTorch kernel is on same machine as client of course), but like th
, iTorch's Lua repl fails to e.g. require 'qtgui'
:
/home/john/torch/install/share/lua/5.1/qtgui/init.lua:2: module 'qt' not found:
no field package.preload['qt']
no file './qt.lua'
no file '/home/john/torch/install/share/luajit-2.1.0-alpha/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/john/torch/install/share/lua/5.1/qt.lua'
no file '/home/john/torch/install/share/lua/5.1/qt/init.lua'
no file './qt.so'
no file '/usr/local/lib/lua/5.1/qt.so'
no file '/home/john/torch/install/lib/lua/5.1/qt.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/home/john/torch/install/share/lua/5.1/qtgui/init.lua:2: in main chunk
you cannot use the qt interface without qlua. You can hack the itorch launcher script to launch using qlua (instead of luajit).
https://github.com/facebook/iTorch/blob/master/itorch_launcher#L17
Change lines 17,18 from "luajit" to "qlua"
Thanks, that works. Perhaps it should be the default?: facebookarchive/iTorch#47