打开archlinux cn这个源
然后:
pacman -Sy loadcaffe-git torch7-cunn-git torch7-cutorch-git torch7-cwrap-git torch7-dok-git torch7-env-git torch7-git torch7-graph-git torch7-hdf5-git torch7-image-git torch7-lmdb-git torch7-nn-git torch7-nngraph-git torch7-optim-git torch7-paths-git torch7-sys-git torch7-tds-git torch7-threads-git torch7-xlua-git
yaourt -S torch7-trepl-git
如果不会打开这个源那么,就这样
yaourt -Sy loadcaffe-git torch7-cunn-git torch7-cutorch-git torch7-cwrap-git torch7-dok-git torch7-env-git torch7-git torch7-graph-git torch7-hdf5-git torch7-image-git torch7-lmdb-git torch7-nn-git torch7-nngraph-git torch7-optim-git torch7-paths-git torch7-sys-git torch7-tds-git torch7-threads-git torch7-xlua-git torch7-trepl-git
如果有些包装不上,那么
yaourt torch7
然后选择所有包,都装上就好了.torch7-trepl-git 这个是torch7的shell,一定要装.
=========================================================
只要有anaconda,就能有torch
conda install lua=5.2 lua-science -c alexbw
还可以用IPython 和 ITorch jupyter-notebook
搞定!
==========================================================
先用conda安装luarocks
conda install -c conda-forge luarocks
然后用这个luarocks安装torch7
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch
TORCH_LUA_VERSION=LUA52 ./install.sh
source ~/.bashrc
luarocks install image
luarocks list
这样就装好了,从git下来的最新的torch7
$ th
______ __ | Torch7
/_ / ________/ / | Scientific computing for Lua.
/ / / _ / __/ / _ \ | Type ? for help
/_/ _// _//// | https://github.com/torch
| http://torch.ch
th> torch.Tensor{1,2,3}
1
2
3
[torch.DoubleTensor of dimension 3]
th>