简体   繁体   English

使用计算机中的驱动器地址进入 google colab

[英]using a drive address from computer into google colab

I am new to python and google colab.我是 python 和 google colab 的新手。 I want to run this part of code in google colab.我想在 google colab 中运行这部分代码。 but i get the error: no such file or directory...this code is run on my computer and I get the image, well.但我收到错误:没有这样的文件或目录...此代码在我的计算机上运行,​​我得到了图像。 can you help me?你能帮助我吗?

import os
import matplotlib.pyplot as plt
import matplotlib.image as mpimg

BASEDIR = "e:\datasets\Caltech60\train\001.ak47"

list_open =mpimg.imread(os.path.join(BASEDIR, '001_0001.jpg'))
plt.imshow(list_open)

How do I import a csv file into Google Colab that uses R kernel? 如何将 csv 文件导入使用 R 内核的 Google Colab?

Here I pointed how to upload your data to google colab, you must then change in your code BASEDIR="001.ak47"在这里,我指出了如何将您的数据上传到 google colab,然后您必须更改您的代码BASEDIR="001.ak47"

Let me know if it works, as wrote in the answer there is a mount drive option for python kernel in case you want to use it (as you mention drive address in your question)让我知道它是否有效,如答案中所写,如果您想使用它,python 内核有一个安装驱动器选项(正如您在问题中提到的驱动器地址)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM