問題: 在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 ,成功通過!