简体   繁体   English

导入自己的模块问题:没有名为'xx'的模块

[英]import own module problem: no module named'xx'

I met troubles in importing my own modules.我在导入自己的模块时遇到了麻烦。 As you can see it said no module named guvBB, but I actually have guvBB.py.如您所见,它说没有名为guvBB 的模块,但我实际上有guvBB.py。 What is the problem?问题是什么? Thank you谢谢在此处输入图像描述

在此处输入图像描述

you have added the path on your system to the path on colab.您已将系统上的路径添加到 colab 上的路径中。 google doesnt have access to c://.......谷歌无权访问c://.......

go to table of content, find the folder,right click on it and put that path in your code sys.path.append(newpath) . go 到目录,找到文件夹,右键单击它并将该路径放入您的代码sys.path.append(newpath)

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

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