Windows ipython notebook -how to do cd cs231n/datasets ./get



我正在运行Windows 10和anaconda python 3.6我想运行这个,其中cs231n在我的工作目录下的目录中

cd cs231n/datasets
./get_datasets.sh

文件 ",第 1 行 CD CS231n/数据集 ^语法错误:语法无效

我也试过

cd cs231n\datasets\
.\get_datasets.sh

[错误 267] 目录名称无效:u'cs231n//datasets/.//get_datasets.sh'C:\用户\帐单\文档\分配1

您似乎正在尝试在 Python 中运行 shell 脚本。IPython 内核提供了更改目录%cd魔力,以及运行 shell 命令!

因此,您应该按照以下方式运行一些内容:

%cd cs231n/datasets # IPython magic command to change directories
! ./get_datasets.sh # Shell command within IPython. 
print('Got datasets.') # Regular Python code. 

如果不确定发生了什么,请查看Python和IPython之间的差异。

最新更新