Anaconda [ˌænəˈkɒndə]指的是一个开源的Python发行版本,其包含了conda、Python等180多个科学包及其依赖项。
Keras是一个由Python编写的开源人工神经网络库,可以作为Tensorflow、Microsoft-CNTK和Theano的高阶应用程序接口,进行深度学习模型的设计、调试、评估、应用和可视化
TensorFlow™ [ˈtensə®]是一个基于数据流编程(dataflow programming)的符号数学系统,被广泛应用于各类机器学习(machine learning)算法的编程实现,其前身是谷歌的神经网络算法库DistBelief [1] 。它由 Google 开发,并在图形分类、音频处理、推荐系统和自然语言处理等场景下有着丰富的应用,是目前最热门的机器学习框架http://c.biancheng.net/tensorflow/
OpenCV是一个基于BSD许可(开源)发行的跨平台计算机视觉库,可以运行在Linux、Windows、Android和Mac OS操作系统上。它轻量级而且高效——由一系列 C 函数和少量 C++ 类构成,同时提供了Python、Ruby、MATLAB等语言的接口,实现了图像处理和计算机视觉方面的很多通用算法
2017年1月,由Facebook人工智能研究院(FAIR)基于Torch推出了PyTorch [tɔːrtʃ]。它是一个基于Python的可续计算包,提供两个高级功能:1、具有强大的GPU加速的张量计算(如NumPy)。2、包含自动求导系统的的深度神经网络
Anaconda安装,keras,tensorflow安装:https://blog.csdn.net/qq_41760767/article/details/97441967
https://repo.anaconda.com/archive/Anaconda3-5.2.0-Windows-x86_64.exe
Opencv安装:https://www.cnblogs.com/jisongxie/p/10248550.html
pytorch安装:https://www.cnblogs.com/wzw0625/p/11963482.html
https://www.cnblogs.com/xueweihan/p/4981704.html
-------------------------------以下为搭建环境的详细过程---------------------------------
官网下载地址:https://www.anaconda.com/products/individual,本人安装Anaconda3-5.2.0-Windows-x86_64.exe的版本,版本对应
除了环境变量勾选一下其他一直下一步,若弹出vscode就是一个编辑器,随意了跳过就行
3.安装完成后查看是否安装成功。比如有的人手贱点了vscode安装最后由于网络等原因后面导致安装没有反应了,半天安装条进度没有变化,这个时候你可以通过如下几种方式看看是否安装成功https://baijiahao.baidu.com/s?id=1616120886763657106&wfr=spider&for=pc
点击“开始” —— “Anaconda3(64-bit)” —— “右键点击Anaconda Prompt” —— 点击“以管理员身份运行”,在Anaconda Prompt中输入conda list,可以查看已经安装的包名和版本号。如果结果可以正常显示,则说明安装成功
建立一个工作目录,就是一个文件夹,怎么建什么名字你喜欢就好
cmd到工作目录下执行命令:
conda create --name tensorFlow python=3.5 anaconda
安装完成
cmd到pythonwork工作目录执行命令
activate tensorFlow
继续执行命令
pip install tensorFlow
安装失败请移步后面的安装失败
大概是pip版本低导致的,我们先按照建议执行命令
python -m pip install --upgrade pip
哦豁不行还是一样的错误
换一个命令更新
python -m pip install -U pip
等待pip安装成功。查看下pip的版本,之前是10.0.1现在是,看来确实升级成功了
pip -V
由于网络原因等了一万年还是失败了,建议pip下载源为国内镜像库,这里就不修改了手动使用下豆瓣的镜像库安装tensorflow其他加速
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
pip install tensorflow -i https://pypi.douban.com/simple
快到飞起但是装完后还是有报错
会不会还是网络原因,再试一遍
我擦报错少了一个,再试一遍,我擦报错又少了一个
还是看看安装成功了没把
pip list
没有tensorflow~,安装失败了,继续战斗吧,使用强制安装命令试一下
pip install --ignore-installed <库名>
pip install --ignore-installed tensorflow -i https://pypi.douban.com/simple
还是报错
看来这个模块必须得安装,那就先安装了试下
pip install msgpack-python
pip install msgpack
再执行之前安装tensorflow的命令试一下
pip install tensorflow -i https://pypi.douban.com/simple
挖草
是成功了吗?pip list 好像成功拉!
后面发现版本和python版本不对应需要卸载后重装同时最好把附带的一些库也卸了(tensorboard、tensorflow- estimator之类与tensorflow相关的库),我的python版本是3.6.5对应的是1.6.0具体可查看后面的python对应的tensorflow版本
pip uninstall tensorflow tensorboard tensorflow-estimator
pip install -i https://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com tensorflow==2.0.0
由于版本问题后面会导致导入包失败,看看安装了对应的python版本的tf没有的话需要卸载重写安装
pip uninstall tensorflow tensorboard tensorflow-estimator gast
cmd到pythonwork工作目录执行命令
pip install keras
https://docs.floydhub.com/guides/environments/
Framework | Env name (–env parameter) | Description | Docker Image | Packages and Nvidia Settings |
TensorFlow 2.1 | tensorflow-2.1 | TensorFlow 2.1.0 + Keras 2.3.1 on Python 3.6. | floydhub/tensorflow | TensorFlow-2.1 |
TensorFlow 2.0 | tensorflow-2.0 | TensorFlow 2.0.0 + Keras 2.3.1 on Python 3.6. | floydhub/tensorflow | TensorFlow-2.0 |
TensorFlow 1.15 | tensorflow-1.15 | TensorFlow 1.15.0 + Keras 2.3.1 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.15 |
TensorFlow 1.14 | tensorflow-1.14 | TensorFlow 1.14.0 + Keras 2.2.5 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.14 |
TensorFlow 1.13 | tensorflow-1.13 | TensorFlow 1.13.0 + Keras 2.2.4 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.13 |
TensorFlow 1.12 | tensorflow-1.12 | TensorFlow 1.12.0 + Keras 2.2.4 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.12 |
tensorflow-1.12:py2 | TensorFlow 1.12.0 + Keras 2.2.4 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.11 | tensorflow-1.11 | TensorFlow 1.11.0 + Keras 2.2.4 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.11 |
tensorflow-1.11:py2 | TensorFlow 1.11.0 + Keras 2.2.4 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.10 | tensorflow-1.10 | TensorFlow 1.10.0 + Keras 2.2.0 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.10 |
tensorflow-1.10:py2 | TensorFlow 1.10.0 + Keras 2.2.0 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.9 | tensorflow-1.9 | TensorFlow 1.9.0 + Keras 2.2.0 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.9 |
tensorflow-1.9:py2 | TensorFlow 1.9.0 + Keras 2.2.0 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.8 | tensorflow-1.8 | TensorFlow 1.8.0 + Keras 2.1.6 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.8 |
tensorflow-1.8:py2 | TensorFlow 1.8.0 + Keras 2.1.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.7 | tensorflow-1.7 | TensorFlow 1.7.0 + Keras 2.1.6 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.7 |
tensorflow-1.7:py2 | TensorFlow 1.7.0 + Keras 2.1.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.5 | tensorflow-1.5 | TensorFlow 1.5.0 + Keras 2.1.6 on Python 3.6. | floydhub/tensorflow | TensorFlow-1.5 |
tensorflow-1.5:py2 | TensorFlow 1.5.0 + Keras 2.1.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.4 | tensorflow-1.4 | TensorFlow 1.4.0 + Keras 2.0.8 on Python 3.6. | floydhub/tensorflow | |
tensorflow-1.4:py2 | TensorFlow 1.4.0 + Keras 2.0.8 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.3 | tensorflow-1.3 | TensorFlow 1.3.0 + Keras 2.0.6 on Python 3.6. | floydhub/tensorflow | |
tensorflow-1.3:py2 | TensorFlow 1.3.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.2 | tensorflow-1.2 | TensorFlow 1.2.0 + Keras 2.0.6 on Python 3.5. | floydhub/tensorflow | |
tensorflow-1.2:py2 | TensorFlow 1.2.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.1 | tensorflow | TensorFlow 1.1.0 + Keras 2.0.6 on Python 3.5. | floydhub/tensorflow | |
tensorflow:py2 | TensorFlow 1.1.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 1.0 | tensorflow-1.0 | TensorFlow 1.0.0 + Keras 2.0.6 on Python 3.5. | floydhub/tensorflow | |
tensorflow-1.0:py2 | TensorFlow 1.0.0 + Keras 2.0.6 on Python 2. | floydhub/tensorflow | ||
TensorFlow 0.12 | tensorflow-0.12 | TensorFlow 0.12.1 + Keras 1.2.2 on Python 3.5. | floydhub/tensorflow | |
tensorflow-0.12:py2 | TensorFlow 0.12.1 + Keras 1.2.2 on Python 2. | floydhub/tensorflow | ||
PyTorch 1.4 | pytorch-1.4 | PyTorch 1.4.0 + fastai 1.0.60 on Python 3.6. | floydhub/pytorch | PyTorch-1.4 |
PyTorch 1.3 | pytorch-1.3 | PyTorch 1.3.0 + fastai 1.0.60 on Python 3.6. | floydhub/pytorch | PyTorch-1.3 |
PyTorch 1.2 | pytorch-1.2 | PyTorch 1.2.0 + fastai 1.0.60 on Python 3.6. | floydhub/pytorch | PyTorch-1.2 |
PyTorch 1.1 | pytorch-1.1 | PyTorch 1.1.0 + fastai 1.0.57 on Python 3.6. | floydhub/pytorch | PyTorch-1.1 |
PyTorch 1.0 | pytorch-1.0 | PyTorch 1.0.0 + fastai 1.0.51 on Python 3.6. | floydhub/pytorch | PyTorch-1.0 |
pytorch-1.0:py2 | PyTorch 1.0.0 on Python 2. | floydhub/pytorch | ||
PyTorch 0.4 | pytorch-0.4 | PyTorch 0.4.1 on Python 3.6. | floydhub/pytorch | PyTorch-0.4 |
pytorch-0.4:py2 | PyTorch 0.4.1 on Python 2. | floydhub/pytorch | ||
PyTorch 0.3 | pytorch-0.3 | PyTorch 0.3.1 on Python 3.6. | floydhub/pytorch | PyTorch-0.3 |
pytorch-0.3:py2 | PyTorch 0.3.1 on Python 2. | floydhub/pytorch | ||
PyTorch 0.2 | pytorch-0.2 | PyTorch 0.2.0 on Python 3.5 | floydhub/pytorch | |
pytorch-0.2:py2 | PyTorch 0.2.0 on Python 2. | floydhub/pytorch | ||
PyTorch 0.1 | pytorch-0.1 | PyTorch 0.1.12 on Python 3. | floydhub/pytorch | |
pytorch-0.1:py2 | PyTorch 0.1.12 on Python 2. | floydhub/pytorch | ||
Theano 0.9 | theano-0.9 | Theano rel-0.8.2 + Keras 2.0.3 on Python3.5. | floydhub/theano | |
theano-0.9:py2 | Theano rel-0.8.2 + Keras 2.0.3 on Python2. | floydhub/theano | ||
Caffe | caffe | Caffe rc4 on Python3.5. | floydhub/caffe | |
caffe:py2 | Caffe rc4 on Python2. | floydhub/caffe | ||
Torch | torch | Torch 7 with Python 3 env. | floydhub/torch | |
torch:py2 | Torch 7 with Python 2 env. | floydhub/torch | ||
Chainer 1.23 | chainer-1.23 | Chainer 1.23.0 on Python 3. | floydhub/chainer | |
chainer-1.23:py2 | Chainer 1.23.0 on Python 2. | floydhub/chainer | ||
Chainer 2.0 | chainer-2.0 | Chainer 1.23.0 on Python 3. | floydhub/chainer | |
chainer-2.0:py2 | Chainer 1.23.0 on Python 2. | floydhub/chainer | ||
MxNet 1.0 | mxnet | MxNet 1.0.0 on Python 3.6. | floydhub/mxnet | |
mxnet:py2 | MxNet 1.0.0 on Python 2. | floydhub/mxnet |
切换到pythonwork
并启动tensorFlow的Anaconda的虚拟环境 ,分别执行以下命令
1.activate tensorFlow
2.jupyter notebook
启动成功后弹出jupyter的网页
在程序单元格中输入:
import tensorflow as tf
tf.__version__
import keras
keras.__version__
关闭浏览器后,回到命令提示窗口,按Ctrl+C组合键即可关闭Jupyter Notebook程序
cmd中执行命令
pip install opencv-python
conda search opencv
进入anaconda prompt
建立名为PyTorch的虚拟环境
conda create --name PyTorch python=3.6
激活PyTorch虚拟环境
activate PyTorch
安装PyTorch,官网地址:**https://pytorch.org/get-started/locally/**选择Windows、Pip、Python 3.6、None CUDA环境,然后在Anaconda Prompt下名为PyTorch虚拟环境下执行下面的命令
pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
失败了~后面用pip3成功了
pip3 install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html