导入错误:未找到模块对象检测 [英] Import error: module object detection not found

查看:74
本文介绍了导入错误:未找到模块对象检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 Jupyter Notebook 中运行代码时,出现导入错误(附加图像).我将路径添加到 PYTHON_PATH 并在系统路径中添加 %PYTHON_PATH%,但我仍然遇到错误

When i try run code into Jupyter notebook i getting Import error(attached image). I add paths to PYTHON_PATH and add %PYTHON_PATH% in system PATH, but i still get thos error

推荐答案

如果您使用的是 Anaconda,您必须知道它会忽略 PYTHONPATH!.使用以下命令:

If you are using Anaconda, you must know that it ignores PYTHONPATH!. Use the following commands:

conda 开发 ~/models/research/

conda 开发 ~/models/research/slim/

这里就是您需要这样做的原因它以这种方式.当您发出上述命令时,它会在您当前的环境 site-packages 文件夹中创建一个 .pth 文件.然后,将这两个路径添加到这个 .pth 文件中.然后,每当您加载 Anaconda 提示符时,它们都在路径上.这适用于 Linux 和 Windows.

here is why you need to do it in this way. When you issue the above commands, it will create a .pth file inside your current's environment site-packages folder. Then, adds those two paths to this .pth file. Then, whenever you load your Anaconda prompt, those are on the path. This works for both Linux and Windows.

这篇关于导入错误:未找到模块对象检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆