我想知道如何在Google Colab的ipython(jupyter notbook)上运行bash出售脚本文件。我从github下载了一个深度学习代码包,并将其上传到我的Google驱动器上,然后将goole驱动器安装到了Google Colab上。该代码包包含“ * .py” python代码和“ fn.sh”脚本文件。通过执行脚本文件,可以执行python代码。
我在Google Colab的ipython提示符下尝试了os.system('fn.sh')和subprocess.call('fn.sh'),但它们无法像下面那样工作。
1)
导入操作系统os.system('驱动器/DL/denet-master/examples/simple-cifar10.sh')32256
2)
导入子进程subprocess.call('drive / DL / denet-master / examples / simple-cifar10.sh')OSError:[Errno 8] Exec格式错误:'drive / DL / denet-master / examples / simple-cifar10.sh '