我遵循以下方法在我的机器 (Mac) 中安装 Torch。
http://torch.ch/docs/getting-started.html#_
安装完成后,我输入:$ luarocks install image
或 $ luarocks lis
或 $th
为了加载 th
或者对 lua 包进行更新。它说“找不到命令”。你知道我该如何解决这个问题吗?
最佳答案
如果您使用的是 苹果机 使用 bash 终端 ,请确保您已永久添加 /Users/you/torch/install/bin
给您的 路径 .
去做这个:
$ cd
$ emacs .bash_profile
PATH=$PATH\:/Users/you/torch/install/bin ; export PATH
$ source .bash_profile
/Users/you/torch/install/bin
):$ echo $PATH
echo $PATH again
th
它应该运行 Torch! 有关 PATH 的更多帮助:
https://kb.iu.edu/d/acar
Torch 安装(至少对我而言)添加了行
. /Users/jb/torch/install/bin/torch-activate
到我的 .profile 文件,而不是 .bash_profile .我尝试将该行添加到 .bash_profile 但它不起作用,因此根据此处的建议,我摆脱了尾随目录等。
关于macos - Torch/Lua 安装后不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30143308/