您的位置:首页 > 其它

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

2016-01-20 19:34 204 查看
问题: 在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 ,成功通过!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  source os