Installing Torch : 参考网址: http://torch.ch/docs/getting-started.html
git clone https://github.com/torch/distro.git ~/torch –recursive
cd ~/torch;
bash install-deps;
./install.sh
source ~/.bashrc安装luarocks
sudo apt-get install luarocks
测试:
luarocks install image
luarocks list执行 $ luarocks install image 时,若出现如下错误:
Error: Your user does not have write permissions in /usr/local/lib/luarocks/rocks
– you may want to run as a privileged user or use your local tree with –local.解决办法: install torch with Lua 5.2 instead of LuaJIT, simply run:
# clean old torch installation
cd ~torch
./clean.sh
TORCH_LUA_VERSION=LUA52 ./install.sh程序执行到最后,会询问:
Do you want to automatically prepend the Torch install location
to PATH and LD_LIBRARY_PATH in your /home/hri/.bashrc? (yes/no)
[yes] >>>输入:
yes
这时候,打开~/.bashrc,
sudo gedit ~/.bashrc
在末尾会见到: . /home/hri/torch/install/bin/torch-activate
其中/home/hri/torch/是torch安装的路径, 关闭./bashrc文件,执行如下命令:source ~/.bashrc
bash再次执行 步骤3, 成功,执行
th
将出现Getting started with Torch最后的结果
安装torch与luarocks的一些问题
最新推荐文章于 2024-08-13 08:43:42 发布