Win7 Installing the anaconda+tensorflow+ configuration PycharmMarch 31, 2017 10:52:17Hits: 24251First summarize oneself encounters the pit: (Look back to think actually installs very simple)
The first pit: Anaconda must install version 4.2, cannot install version 4.3; Full of blood and tears.
Because we need to install our own Python must be 3.5 before we can call TensorFlow
But the anaconda4.3 is python3.6 and cannot be called TensorFlow
Second pit:
Google that group of people have been installed further simplified, do not like the past installation also use Conda command, it is easy to install the location of God horse wrong, the history of blood and tears everywhere looking for problems.
Below begins the pleasant installation.
The third pit: cmd for tensflow installation, run as administrator to install.
The following begins a pleasant installation: The first step: official website: https://www.continuum.io/downloads The current official website is 43 million do not download the hand,
Open, find version 4.2
Step Two: Install Anaconda
During the installation process, Anaconda will be prompted to add to the environment variable, select "Yes"; (Don't look too much, basically keep next in the end)
Step three: Detect if Python is installed and the environment is configured successfully
CMD ("Python")
Verify that the installation is successful:
相关知识插入:TensorFlow 有两个版本:CPU 版本和 GPU 版本。GPU 版本需要 CUDA 和 cuDNN 的支持,CPU 版本不需要。如果你要安装 GPU 版本,请先确认你的显卡支持 CUDA。采用 pip 安装方式,本文安装cpu版本1.确认版本:pip版本 >= 8.1。用 pip -V 查看当前 pip 版本,用 python -m pip install -U pip 升级pip 。2.确保你安装了 VS2015 或者 2013 或者 2010。
Fourth Step: TensorFlow installation (I installed the CPU version)
Run cmd as Administrator
CD to this address:
cd Program Files\Anaconda3\Scripts
Input:
install tensorflow
Additional Information:
One-click installation (CPU Version):
pip install --upgrade --ignore-installed tensorflow
(GPU Version)
pip install --upgrade --ignore-installed tensorflow-gpu
Fifth Step: Test
In the cmd input
pythonimport tensorflow as tfhello = tf.constant(‘Hello, TensorFlow!‘)sess = tf.Session()print(sess.run(hello))
Output: Hello, tensorflow!
a = tf.constant(10)b = tf.constant(32)print(sess.run(a + b))
Output: 42
Sixth Step: Configure Pycharm
Open "File" "Setting" "
Create a new one in the inside and test it:
Enter an interactive tensorflow session.
import tensorflow as tfhello = tf.constant(‘Hello, TensorFlow!‘)sess = tf.Session()print(sess.run(hello))、
The result is:
Seventh Step: Configure the Tsinghua Source (installation completed in the configuration, the order error back very disgusting)
After installation, open Anaconda Prompt, enter the Tsinghua warehouse image, update the package faster:
Conda Config–add Channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
Conda config–set show_channel_urls Yes ()
Win7 Installing anaconda+tensorflow+ configuration pycharm (RPM)