小白对 imageAI环境搭建 实现object detection 的初使用(自己所用)
第一步 下载并安装anaconda(略)
第二步 下载并安装 pycharm(略)
第三步 开始配置 安装imageAI
具体步骤如下:
打开anaconda prompt
生成.condorc
`conda config``
打开.condorc文件
conda config --show-sources
输入镜像源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/ conda config --set show_channel_urls yes)
或清华镜像源(我用的这个)
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes
额外的源 (我没用)
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
删除镜像源命令(有删除操作可用)
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
创建虚拟环境
(如 imageai 名字任意)
conda create --name imageai python=3.5
进入创建的环境
activate imageai
查看目前已存在的环境
`(imageai) C:\Users\86166>conda info --envs
conda environments:
base D:\Anaconda3
imageai * D:\Anaconda3\envs\imageai(*表示目前在这个环境中)`
查看可以安装的tensorflow版本
conda search --full-name tensorflow
安装tensorflow==2.1.0 版本(可任意版本)
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==2.1.0
卸载命令(想卸载时可用)
pip uninstall tensorflow==2.1.0
升级·
pip3 install --upgrade tensorflow
重新装 (我是装了2.1.0版本出错了,于是卸了重装了)
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.15.0
测试tensorflow 是否安装成功
进入 python
输入
import tensorflow as tf
2020-06-18 15:54:20.169374: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_100.dll’; dlerror: cudart64_100.dll not found
2020-06-18 15:54:20.173292: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
(不是gpu版的忽略)
import tensorflow as tf
tf.version
‘1.15.0’
tf.path
[‘D:\Anaconda3\envs\imageai\lib\