0.各个镜像源
https://pypi.douban.com/simple/ 豆瓣
https://mirrors.aliyun.com/pypi/simple/ 阿里
https://pypi.hustunique.com/simple/ 华中理工大学
https://pypi.sdutlinux.org/simple/ 山东理工大学
https://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
https://pypi.tuna.tsinghua.edu.cn/simple 清华
-----------------
conda env list
1.创建python环境
conda create -n tf14 python=3.6
2.激活环境
conda activate tf14
3.
pip install tensorflow==1.14 -i https://pypi.douban.com/simple
-----------------------------------------
tensorflow玉numpy版本匹配
pip uninstall numpy
pip install numpy==1.16.4 -i https://pypi.douban.com/simple
-----------------------------------------
4.测试tensorflow是否按照成功
---------------------------------
import tensorflow as tf
sess = tf.Session()
hello = tf.constant('hello, tensorflow!')
print(sess.run(hello))
----------------------------------
5.在D:\tensorflow\models\research下执行
-------------------------------
python setup.py install
需要等一段时间
-------------------------------
6.测试tensorflow object detection api是否安装成功
-------------------------------
python object_detection/builders/model_builder_test.py
问题:当发现ModuleNotFoundError: No module named 'nets',我告诉你怎么办
在*/research/slim下运行命令
-------------------------------
python setup.py build
python setup.py install
-------------------------------
ModuleNotFoundError: No module named 'matplotlib'
pip install matplotlib -i https://pypi.douban.com/simple
pip install requests -i https://pypi.douban.com/simple
pip install jupyter -i https://pypi.douban.com/simple
--------------------------------------------------------------------------------------------------------
C:\Users\admin\Anaconda3\envs\tf14\lib\site-packages\ipykernel_launcher.py:22: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
运行第二次
问题:
D:/tensorflow/models/research/object_detection/object_detection_example_2.py:115: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
解决方案:
-------------------------------------------------------------
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
--------------------------------------------------------------