[英]ModuleNotFoundError: No module named 'lanenet_model' - Google Colab
I'm trying to use this repository for a lanenet implementation in google colab.我正在尝试将此存储库用于 google colab 中的lanenet 实现。 After cloning the repository I'm want to test out the model by calling:
克隆存储库后,我想通过调用测试 model:
!python ./tools/test_lanenet.py --weights_path tusimple_lanenet.ckpt.data-00000-of-00001 --image_path test_img.jpg
I'm calling the file "test_lanenet.py" in the "tools" subfolder.我在“工具”子文件夹中调用文件“test_lanenet.py”。 This file tries to import another python file, which is in another subfolder (lanenet_model/lanenet.py) with:
此文件尝试导入另一个 python 文件,该文件位于另一个子文件夹 (lanenet_model/lanenet.py) 中:
from lanenet_model import lanenet
But then I get the Error但后来我得到了错误
Traceback (most recent call last):
File "./tools/test_lanenet.py", line 20, in <module>
from lanenet_model import lanenet
ModuleNotFoundError: No module named 'lanenet_model'
__init__.py
file__init__.py
文件 Does anybody has an idea what I can do to fix the problem?有人知道我能做些什么来解决这个问题吗?
Here's the folder tree: lanenet folders这是文件夹树: lanenet 文件夹
Try moving the.py file you want to run to the project root path, then run.尝试将要运行的.py文件移动到项目根路径下,然后运行。 such as
如
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.