OS X source ~/.profile 找不到文件或目錄

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章