首页 文章

如何在Google Colab上的ipython上运行shell脚本文件

提问于
浏览
0

我想知道如何在Google Colab上运行ipython(jupyter notbook)上的bash卖脚本文件 . 我从github下载了一个Deep-learning代码包,并将它们上传到我的google驱动器上,然后在Google Colab上安装goole驱动器代码包中包含'* . py'python代码和'fn.sh'脚本文件 . 通过执行脚本文件,可以执行python代码 .

我在Google Colab的ipython提示符下尝试了os.system('fn.sh')和subprocess.call('fn.sh'),但是它们不能像下面那样工作 .

1)

import os os.system('drive / DL / denet-master / examples / simple-cifar10.sh')32256

2)

import subprocess subprocess.call('drive / DL / denet-master / examples / simple-cifar10.sh')OSError:[Errno 8] Exec格式错误:'drive / DL / denet-master / examples / simple-cifar10 . SH”

1 回答

相关问题