window Anaconda installation tensorflow cpu version

Tensorflow cpu version installed on the window

Bottom line: good pit! ! Do not look at Chinese blog off the source of the installation, which is a summary of the old lady's years of experience

踩坑tensorflow安装,最大最深刻的体验就是,千万不要,千万不要,千万不要,轻信任何安装博客,
尤其是中文博客,究其核心,体现为:
1,Tensorflow是开源项目,它始终都在变化。

因此,在安装时,如果参考其他博客安装。主要的坑会表现在2点:
1,或许你看的博客发表于2018年8月,安装步骤早已发生变化;
2,或许这篇博客对应的操作系统设置和你不同,它的坑你没遇到,它没遇到的坑被你碰到了,于是,你又去找另外的博客......,接着就是各种裹不清,死循环。

所以,点开官网最新的安装教程,注意操作系统类型,及各种requirement的提示和要求(比如,CUDA和cnDNN),一步一步照着做,丝丝顺滑的安装成功。

Official website: https: //tensorflow.google.cn/install

Tips:

官网上有句话:

A few installation mechanisms require the URL of the TensorFlow Python package. The value you specify depends on your Python version.

不同平台对应不同安装包,因此,请参考官方文档。

The following is a reference! ! You're probably not take this tutorial! ! !

Reference: https: //blog.csdn.net/wust_lh/article/details/80408505

Anaconda version: Anaconda3-4.3.14
Python version: Python 3.5.2 ( I used 3.6.0 unsuccessful )
tensorflow version: tensorflow 1.2.1

Here Insert Picture Description

Anaconda installation

1. official website to download the installation package: Anaconda's official website, install;
2. Start run CMD, administrator rights mode.
3. Check whether the installation was successful installation: Conda --version
4. Check the current installation environment: Conda info --envs
5. Check the current version of which can be installed python: conda search --full-name python

Install python and tensorflow environment

6. Select a python version Installation (Pick python3.5.2 version): Conda 3.5.2 Create --name tensorflow python =
6.1 python successful installation:
62 enter the command: the activate tensorflow.
7.tensorflow environment has been added successfully: conda info - -envs; see the python version in tensorflow environment: python --version
Here Insert Picture Description

TensorFlow installation

Using anaconda installation in windows installation tensorflow. Installation cpu version
anaconda search -t conda tensorflow

View installable version specified package information command

anaconda show <USER/PACKAGE>

Specifies an anaconda / tensorflow version information

anaconda show anaconda/tensorflow

The output will provide a download address, you can use the following command to specify the version 1.2.1 installed tensorflow

conda install --channel https://conda.anaconda.org/anaconda tensorflow=1.2.0

Why install 1.2.1? ? ? Because I used conda search --full-name tensorflow

Here Insert Picture Description
I think this is the safest, although the anaconda search -t conda tensorflow display may have 1.8.0 and other versions can be installed.

test

Tensorflow test whether the installation was successful: Enter Anaconda Prompt from the Start menu bar.

In turn enter the command:
View the installed version:

activate tensorflow

pip show tensorflow
Here Insert Picture Description

python

import tensorflow as tf

Appendix: The following is the pip install, how are not installed on

1. [Model] Error Error mounting the first case:

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl

[2] Error exemplary installation error Case 2: the install tensorflow PIP
Here Insert Picture Description
3. [Model] Error Error mounted Case 3: pip install --ignore-installed --upgrade tensorflow
Here Insert Picture Description
without going to activate tensorflow, there will be given below
Here Insert Picture Description

ImportError: DLL load failed with error code -1073741795

ImportError: No module named '_pywrap_tensorflow_internal'



16年后tensorflow 1.2版本才能用在windows上;

系统默认的版本是:tensorflow1.8或tensorflow1.9(注意:安装Tensorflow之前默认已经全部安装Tensorflow依赖的其他包,比如scipy+mkl等等)

首先:卸载已经安装的tensorflow 1.9,打开Anaconda Prompt命令窗口,输入 pip uninstall tensorflow;

然后:activate tensorflow,再conda search --full-name tensorflow 

安装命令:pip install tensorflow==1.2,安装成功后检查一下吧!在tensorflow环境下输入:python,然后再输入import tensorflow as tf

- 原文链接:https://blog.csdn.net/qq_27245699/article/details/81050035

Error for this part

The final recommendation (I am also a Chinese blog, only reference, may not be for you yo)

Install the latest version of TensorFlow with anaconda

1, open anaconda-prompt

2, see the individual version tensorflow :( view will find that there are a lot TensorFlow source, but can not pick and choose you can use the Find command positioning)

Search -t Conda tensorflow anaconda
4, after installing the latest TensorFlow find their corresponding environment (anaconda can be searched at the terminal, positioning to that line), and then view the installation command

anaconda show <USER / PACKAGE>
mounted anaconda / tensorflow specific operation command:

Show Anaconda Anaconda / tensorflow
5, Step 4 will provide a download address, you can use the following command to install the new version tensorflow

conda install --channel https://conda.anaconda.org/anaconda tensorflow

Here Insert Picture Description

Published 30 original articles · won praise 3 · views 10000 +

Guess you like

Origin blog.csdn.net/djfjkj52/article/details/104287753