当前位置:网站首页>Anaconda安装+TensorFlow安装+Keras安装+numpy安装(包含镜像和版本信息兼容问题)

Anaconda安装+TensorFlow安装+Keras安装+numpy安装(包含镜像和版本信息兼容问题)

2022-06-25 03:58:00 生活甜甜好运连连

安装Anaconda

Anaconda各个版本的安装包(官网)(根据对应的Python版本找到需要的Anaconda版本安装包进行下载)

安装Anaconda时所有的框框都打勾,直接傻瓜式安装。(注意选择安装地址的时候,地址不要包含中文)

需要添加的镜像:

https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2

tensorflow和numpy对应的版本

tensorflownumpycudacudnn
2.0.01.16.4  
1.14.01.16.010.07.6.5
1.13.11.16.0  
1.12.01.15.4  
1.8.01.14.5 

更改numpy版本方法:

pip install -U -i https://pypi.tuna.tsinghua.edu.cn/simple numpy==版本
# -U 是重装
# -i https://pypi.tuna.tsinghua.edu.cn/simple 是使用清华镜像

或者用另外一个镜像(这个镜像的速度更快)

http://pypi.douban.com/simple --trusted-host pypi.douban.com

 1.打开Anaconda Prompt,检查Anaconda是否成功安装:conda --version

 2.检测目前安装了哪些环境:conda info --envs

 4.安装不同版本的python:conda create -n tensorflow python=3.6.5

用到的视频安装教程:Anaconda、Tensorflow、keras安装可能出现的问题及解决/经验分享

教程中用到的命令:Anaconda Prompt

1.(base)环境
python -m pip install -U pip
//正确的结果为:Successfully...
2.(base)环境
//创建名为tensorflow的环境,同时安装python
conda create --name tensorflow python=3.6
3.(base)
activate tensorflow
4.(tensorflow)
pip install tensorflow==1.15.0 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
5.(tensorflow)
//检查tensorflow是否安装成功
python
import tensorflow as tf
//出现安装时间就是安装成功
6.(tensorflow)
pip install keras==2.2.5 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
7.(tensorflow)
//检查keras是否安装成功
python
import keras
//安装成功会显示Using TensofFlow backend

 

我的Anaconda版本:Anaconda3-5.2.0

Python版本:3.6.1.2

keras版本:2.3.1

numpy版本:1.16.0

tensorflow版本:1.15.0

怎么查看安装的tensorflow的版本:

TensorFlow与Keras以及Python版本一一对应表

FrameworkEnv name (--env parameter)Description
TensorFlow 2.2tensorflow-2.2TensorFlow 2.2.0 + Keras 2.3.1 on Python 3.7.
TensorFlow 2.1tensorflow-2.1TensorFlow 2.1.0 + Keras 2.3.1 on Python 3.6.
TensorFlow 2.0tensorflow-2.0TensorFlow 2.0.0 + Keras 2.3.1 on Python 3.6.
TensorFlow 1.15tensorflow-1.15TensorFlow 1.15.0 + Keras 2.3.1 on Python 3.6.
TensorFlow 1.14tensorflow-1.14TensorFlow 1.14.0 + Keras 2.2.5 on Python 3.6.
TensorFlow 1.13tensorflow-1.13TensorFlow 1.13.0 + Keras 2.2.4 on Python 3.6.
TensorFlow 1.12tensorflow-1.12TensorFlow 1.12.0 + Keras 2.2.4 on Python 3.6.
 tensorflow-1.12:py2TensorFlow 1.12.0 + Keras 2.2.4 on Python 2.
TensorFlow 1.11tensorflow-1.11TensorFlow 1.11.0 + Keras 2.2.4 on Python 3.6.
 tensorflow-1.11:py2TensorFlow 1.11.0 + Keras 2.2.4 on Python 2.
TensorFlow 1.10tensorflow-1.10TensorFlow 1.10.0 + Keras 2.2.0 on Python 3.6.
 tensorflow-1.10:py2TensorFlow 1.10.0 + Keras 2.2.0 on Python 2.
TensorFlow 1.9tensorflow-1.9TensorFlow 1.9.0 + Keras 2.2.0 on Python 3.6.
 tensorflow-1.9:py2TensorFlow 1.9.0 + Keras 2.2.0 on Python 2.
TensorFlow 1.8tensorflow-1.8TensorFlow 1.8.0 + Keras 2.1.6 on Python 3.6.
 tensorflow-1.8:py2TensorFlow 1.8.0 + Keras 2.1.6 on Python 2.
TensorFlow 1.7tensorflow-1.7TensorFlow 1.7.0 + Keras 2.1.6 on Python 3.6.
 tensorflow-1.7:py2TensorFlow 1.7.0 + Keras 2.1.6 on Python 2.
TensorFlow 1.5tensorflow-1.5TensorFlow 1.5.0 + Keras 2.1.6 on Python 3.6.
 tensorflow-1.5:py2TensorFlow 1.5.0 + Keras 2.1.6 on Python 2.
TensorFlow 1.4tensorflow-1.4TensorFlow 1.4.0 + Keras 2.0.8 on Python 3.6.
 tensorflow-1.4:py2TensorFlow 1.4.0 + Keras 2.0.8 on Python 2.
TensorFlow 1.3tensorflow-1.3TensorFlow 1.3.0 + Keras 2.0.6 on Python 3.6.
 tensorflow-1.3:py2TensorFlow 1.3.0 + Keras 2.0.6 on Python 2.
TensorFlow 1.2tensorflow-1.2TensorFlow 1.2.0 + Keras 2.0.6 on Python 3.5.
 tensorflow-1.2:py2TensorFlow 1.2.0 + Keras 2.0.6 on Python 2.
TensorFlow 1.1tensorflowTensorFlow 1.1.0 + Keras 2.0.6 on Python 3.5.
 tensorflow:py2TensorFlow 1.1.0 + Keras 2.0.6 on Python 2.
TensorFlow 1.0tensorflow-1.0TensorFlow 1.0.0 + Keras 2.0.6 on Python 3.5.
 tensorflow-1.0:py2TensorFlow 1.0.0 + Keras 2.0.6 on Python 2.
TensorFlow 0.12tensorflow-0.12TensorFlow 0.12.1 + Keras 1.2.2 on Python 3.5.
 tensorflow-0.12:py2TensorFlow 0.12.1 + Keras 1.2.2 on Python 2.
PyTorch 1.5pytorch-1.5PyTorch 1.5.0 + fastai 1.0.61 on Python 3.7.
PyTorch 1.4pytorch-1.4PyTorch 1.4.0 + fastai 1.0.60 on Python 3.6.
PyTorch 1.3pytorch-1.3PyTorch 1.3.0 + fastai 1.0.60 on Python 3.6.
PyTorch 1.2pytorch-1.2PyTorch 1.2.0 + fastai 1.0.60 on Python 3.6.
PyTorch 1.1pytorch-1.1PyTorch 1.1.0 + fastai 1.0.57 on Python 3.6.
PyTorch 1.0pytorch-1.0PyTorch 1.0.0 + fastai 1.0.51 on Python 3.6.
 pytorch-1.0:py2PyTorch 1.0.0 on Python 2.
PyTorch 0.4pytorch-0.4PyTorch 0.4.1 on Python 3.6.
 pytorch-0.4:py2PyTorch 0.4.1 on Python 2.
PyTorch 0.3pytorch-0.3PyTorch 0.3.1 on Python 3.6.
 pytorch-0.3:py2PyTorch 0.3.1 on Python 2.
PyTorch 0.2pytorch-0.2PyTorch 0.2.0 on Python 3.5
 pytorch-0.2:py2PyTorch 0.2.0 on Python 2.
PyTorch 0.1pytorch-0.1PyTorch 0.1.12 on Python 3.
 pytorch-0.1:py2PyTorch 0.1.12 on Python 2.
Theano 0.9theano-0.9Theano rel-0.8.2 + Keras 2.0.3 on Python3.5.
 theano-0.9:py2Theano rel-0.8.2 + Keras 2.0.3 on Python2.
CaffecaffeCaffe rc4 on Python3.5.
 caffe:py2Caffe rc4 on Python2.
TorchtorchTorch 7 with Python 3 env.
 torch:py2Torch 7 with Python 2 env.
Chainer 1.23chainer-1.23Chainer 1.23.0 on Python 3.
 chainer-1.23:py2Chainer 1.23.0 on Python 2.
Chainer 2.0chainer-2.0Chainer 1.23.0 on Python 3.
 chainer-2.0:py2Chainer 1.23.0 on Python 2.
MxNet 1.0mxnetMxNet 1.0.0 on Python 3.6.
 mxnet:py2MxNet 1.0.0 on Python 2.
原网站

版权声明
本文为[生活甜甜好运连连]所创,转载请带上原文链接,感谢
https://blog.csdn.net/RitaAndWakaka/article/details/114413500