【问题标题】:Installation of Torch not working安装 Torch 不工作
【发布时间】:2017-12-06 15:51:15
【问题描述】:

我已经按照 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?

谢谢!

【问题讨论】:

  • 使用 Torch 和 Linux,有时它是黑魔法。尝试 1) 重新安装 Torch,2) 如果您在网关后面工作,则需要通过 export {http,https,ftp}_proxy='http://<USERNAME>:<PASS>@<gateway_IP>:<port>' 命令设置代理详细信息,确保所有非数字和非数字您的用户名和密码中的字母是百分比编码的。好吧,. 可以按原样使用,但我的密码中有;,必须用%3B 替换它。您可以使用this tool to convert chars

标签: lua torch luarocks


【解决方案1】:

只需将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

【讨论】:

    猜你喜欢
    • 2015-07-20
    • 2013-07-14
    • 2018-05-07
    • 2013-11-11
    • 2011-09-05
    • 2016-01-12
    • 1970-01-01
    • 2019-05-21
    • 2019-08-14
    相关资源
    最近更新 更多