火炬test.sh,/ usr / bin / lua:未找到模块“路径”

时间:2017-04-11 14:09:46

标签: linux machine-learning lua torch

我正在torch中安装linux mint

这是我的/etc/linuxmint/info输出

RELEASE=17.2
CODENAME=rafaela
EDITION="Cinnamon 64-bit"
DESCRIPTION="Linux Mint 17.2 Rafaela"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_rafaela_cinnamon_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_rafaela_cinnamon.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 17.2 Cinnamon 64-bit

我已经安装了lua

$ which lua
/usr/bin/lua

$ lua -v 
Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio

然后,我使用以下命令安装了torch

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh

安装成功完成。

但是,当我输入th时,我会th: command not found

另外,当我运行test.sh脚本时,

/usr/bin/lua
/usr/bin/lua: module 'paths' not found:
    no field package.preload['paths']
    no file '/usr/local/share/lua/5.2/paths.lua'
    no file '/usr/local/share/lua/5.2/paths/init.lua'
    no file '/usr/local/lib/lua/5.2/paths.lua'
    no file '/usr/local/lib/lua/5.2/paths/init.lua'
    no file '/usr/share/lua/5.2/paths.lua'
    no file '/usr/share/lua/5.2/paths/init.lua'
    no file './paths.lua'
    no file '/usr/local/lib/lua/5.2/paths.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.2/paths.so'
    no file '/usr/lib/lua/5.2/paths.so'
    no file '/usr/local/lib/lua/5.2/loadall.so'
    no file './paths.so'
stack traceback:
    [C]: in function '_G.require'
    [C]: in ?

这里有什么问题?

1 个答案:

答案 0 :(得分:2)

. ~/torch/install/bin/torch-activate中添加~/.bashrc会使test.sh脚本运行。