Google colab changing directory

后端 未结 6 2005
我在风中等你
我在风中等你 2020-12-09 10:44

I can\'t change my directory in Google colab. when I type cd it gives output like this \'/content\' I tried to change the directory using import os os.chdir(\"drive\")

6条回答
  •  醉酒成梦
    2020-12-09 11:20

    Did you create a /drive directory? (By default, one does not exist. You'll need to mount your Drive using a recipe like this one.

    Otherwise, create a directory first. For example,

    !mkdir demo
    %cd demo
    !pwd
    

    will show /content/demo.

提交回复
热议问题