【发布时间】:2018-12-04 10:22:48
【问题描述】:
我想在 Google Colab 上安装 Torch (http://torch.ch/docs/getting-started.html#_)。但是,要安装 Torch,我们需要在最后一步运行以下命令source ~/.bashrc
要在google colab上运行这个命令,我使用的代码是
%%bash
source ~/.bashrc
当我运行这些时,我会收到警告
bash:第 1 行:/content/.bashrc:没有这样的文件或目录
我也是用这个命令找bashrc的
!find / -name '*bashrc'
这是我得到的输出
/root/.bashrc
/etc/skel/.bashrc
/etc/bash.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
我尝试在所有这些路径上运行source 命令。我也尝试使用.profile。但是 Torch 仍然没有安装。
编辑:我不确定是否安装了 Torch。这里的具体问题是我只是得到一个错误
找不到命令
每当我运行 th 或 luarocks
【问题讨论】:
-
获取该文件不会安装任何东西,它是为了更新您的
PATH。 -
我已经安装了 Torch 框架,
source ~/.bashrc只是更新我的个人资料的最后一个命令。但是每当我运行该命令时,都会出现错误。所以我猜问题是Google Colab主目录中没有.bashrc。
标签: bash deep-learning torch google-colaboratory