问题: 在mac上安装torch (http://torch.ch/docs/getting-started.html),执行完命令./install.sh 后,提示:
“
add the following lines to your shell profile:
. /Users/hll/torch/install/bin/torch-activate
” ,没有按照该提示添加环境,就
运行source ~/.profile ,此时出错:“-bash: /Users/hll/.profile: No such file or directory”。
解决方法:
1) 建立一个.profile文件
vim ~/.profile
2) 在新打开的.profile文件中,加入环境变量:
. /Users/hll/torch/install/bin/torch-activate
3) 通过 :wq 保存并退出vim编辑器
4) 再次运行 source ~/.profile ,成功通过!