火炬的安装不起作用

时间:2017-07-03 11:34:54

标签: lua torch luarocks

我按照Lua 5.1附带的说明here安装了Torch,但之前在我的系统上安装了Lua 5.3。现在当我尝试使用Torch运行程序时,我收到以下错误消息:

/Users/Marcel/torch/install/share/lua/5.1/trepl/init.lua:389: module 'Settings.arguments' not found:No LuaRocks module found for Settings.arguments
    no field package.preload['Settings.arguments']

no file '/usr/local/share/lua/5.1/Settings/arguments.lua'
no file '/usr/local/share/lua/5.1/Settings/arguments/init.lua'

好像Torch正在系统目录中寻找自己的Lua版本,它只包含以前安装的版本。有没有办法解决这个问题,还是我必须卸载Lua 5.3?

谢谢!

1 个答案:

答案 0 :(得分:0)

只需将TORCH_LUA_VERSION值更改为LUAXX,因为5.2版本的安装说明中对此进行了解释。对于5.3版本,请使用LUA53

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch

# clean old torch installation
./clean.sh
# optional clean command (for older torch versions)
# curl -s https://raw.githubusercontent.com/torch/ezinstall/master/clean-old.sh | bash

# https://github.com/torch/distro : set env to use lua
TORCH_LUA_VERSION=LUA53 ./install.sh