Python ModuleNotFoundError:没有名为';tf#u slim';

Python ModuleNotFoundError:没有名为';tf#u slim';,python,python-3.x,tensorflow,anaconda,deeplab,Python,Python 3.x,Tensorflow,Anaconda,Deeplab,使用Anaconda尝试设置deeplab() 通过看到其他问题得到回答,我已经解决了很多问题,但遇到了一个似乎没有得到回答的问题: 当尝试运行“python deeplab/model_test.py”时,我得到: (基本)PS D:\DeepLab\models master\research>python DeepLab/model\u test.py C:\Users\Jake\anaconda3\lib\site packages\tensorflow\python\framework

使用Anaconda尝试设置deeplab()

通过看到其他问题得到回答,我已经解决了很多问题,但遇到了一个似乎没有得到回答的问题:

当尝试运行“python deeplab/model_test.py”时,我得到:

(基本)PS D:\DeepLab\models master\research>python DeepLab/model\u test.py
C:\Users\Jake\anaconda3\lib\site packages\tensorflow\python\framework\dtypes.py:516:FutureWarning:Passing(type,1)或'1type'作为type的同义词不推荐使用;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_qint8=np.dtype([(“qint8”,np.int8,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorflow\python\framework\dtypes.py:517:FutureWarning:Passing(type,1)或'1type'作为type的同义词不推荐使用;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_quint8=np.dtype([(“quint8”,np.uint8,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorflow\python\framework\dtypes.py:518:FutureWarning:Passing(type,1)或'1type'作为type的同义词不推荐使用;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_qint16=np.dtype([(“qint16”,np.int16,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorflow\python\framework\dtypes.py:519:FutureWarning:Passing(type,1)或'1type'作为type的同义词不推荐使用;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_quint16=np.dtype([(“quint16”,np.uint16,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorflow\python\framework\dtypes.py:520:FutureWarning:Passing(type,1)或'1type'作为type的同义词不推荐使用;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_qint32=np.dtype([(“qint32”,np.int32,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorflow\python\framework\dtypes.py:525:FutureWarning:Passing(type,1)或'1type'作为type的同义词不推荐使用;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
np_resource=np.dtype([(“resource”,np.ubyte,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorboard\compat\tensorflow\u stub\dtypes.py:541:FutureWarning:不推荐将(type,1)或“1type”作为类型的同义词传递;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_qint8=np.dtype([(“qint8”,np.int8,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorboard\compat\tensorflow\u stub\dtypes.py:542:FutureWarning:不推荐将(type,1)或“1type”作为类型的同义词传递;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_quint8=np.dtype([(“quint8”,np.uint8,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorboard\compat\tensorflow\u stub\dtypes.py:543:FutureWarning:不推荐将(type,1)或“1type”作为类型的同义词传递;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_qint16=np.dtype([(“qint16”,np.int16,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorboard\compat\tensorflow\u stub\dtypes.py:544:FutureWarning:不推荐将(type,1)或“1type”作为类型的同义词传递;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_quint16=np.dtype([(“quint16”,np.uint16,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorboard\compat\tensorflow\u stub\dtypes.py:545:FutureWarning:不推荐将(type,1)或“1type”作为类型的同义词传递;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
_np_qint32=np.dtype([(“qint32”,np.int32,1)])
C:\Users\Jake\anaconda3\lib\site packages\tensorboard\compat\tensorflow\u stub\dtypes.py:550:FutureWarning:不推荐将(type,1)或“1type”作为类型的同义词传递;在numpy的未来版本中,它将被理解为(type,(1,)/“(1,)type”。
np_resource=np.dtype([(“resource”,np.ubyte,1)])
回溯(最近一次呼叫最后一次):
文件“deeplab/model_test.py”,第22行,在
来自deeplab导入模型
文件“D:\DeepLab\models master\research\DeepLab\model.py”,第58行,在
从deeplab.core导入功能提取程序
文件“D:\DeepLab\models master\research\DeepLab\core\feature\u extractor.py”,第24行,在
从deeplab.core导入nas_网络
文件“D:\DeepLab\models master\research\DeepLab\core\nas\u network.py”,第44行,在
来自deeplab.core导入nas_基因型
文件“D:\DeepLab\models master\research\DeepLab\core\nas\u genetipes.py”,第23行,在
从deeplab.core导入nas_单元
文件“D:\DeepLab\models master\research\DeepLab\core\nas\u cell.py”,第29行,在
从deeplab.core导入异常作为异常
文件“D:\DeepLab\models master\research\DeepLab\core\exception.py”,第58行,在
从nets.mobilenet导入conv_块作为mobilenet_v3_操作
**文件“D:\DeepLab\models master\research\slim\nets\mobilenet\conv_blocks.py”,第20行,在
导入tf_slim作为slim
ModuleNotFoundError:没有名为“tf_slim”的模块**
我发现一些建议可能与环境变量有关,但我的建议都是正确的: 我多次刷新anaconda窗口,以确保更改正在进行

我的文件夹目录中有tf\u slim:C:\Program Files\Python36\Lib\site packages\tf\u slim

不知道该怎么办:(我对这种安装方式很陌生


我在windows 10上。

默认情况下,Anaconda会创建一个虚拟环境,如果通过Anaconda提示符打开python,则会打开虚拟环境中的python可执行文件。 这个虚拟环境将有自己的一组模块,并且不会引用系统级python包。 我建议您打开anaconda提示符并键入以下命令:

pip安装tf_slim

尝试运行

Export PYTHONPATH=$PYTHONPATH:’pwd’:’pwd’/slim
我相信

export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
在试用tensorflow/models/research之前,必须从内部进行检查
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
pip install tf_slim