且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

导入错误:未找到模块对象检测

更新时间:2022-03-12 09:37:39

如果您使用的是 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.