Install TensorFlow 1.6 on Windows 10. Basically, I install while looking at the Official Site. I'm a person who hasn't done Python very much, but that's fine. This article uses Anaconda, but Miniconda is also recommended because it can significantly reduce the disk space used. For Miniconda, please refer to the following two articles.
-Install Miniconda on Windows (2018) -Building TensorFlow environment using Miniconda on Windows (2018)
I wrote an environment comparison on Windows in the article "Summary of how to create a machine learning environment on a Windows PC". Please refer to the article "Installing TensorFlow on Ubuntu of WSL" for building a TensorFlow environment on Ubuntu. I also recommend a cloud service called Google Colaboratory. It's easier than Anaconda or Miniconda because you can use TensorFlow without setting up a local environment. Please refer to the article "Google Colaboratory Overview and Instructions (TensorFlow can also be used)" for how to use it.
* The TensorFlow part has been completely renewed from 1.3 installation instructions to 1.6 (2018/3/6) </ sup> * Confirmed that the procedure does not change even with TensorFlow 1.7 (screen shots in this article are still old) (2018/4/10) </ sup>
type | version | Contents |
---|---|---|
OS | Windows10 Professional 64bit | I had never installed Python or Anaconda |
CPU | Intel Corei7-7600U vPro 2.8GHz | With NVIDIA GPU"TensorFlow with GPU support"Can be used(However, it seems that the time and effort will increase a little at the time of installation.)。 |
Anaconda3 | Anaconda 5.0.1 | There is also a way to use pip, but Anaconda seems to be more convenient. The screen shot of the installation procedure is old 4.4.0, but 5.0.Even 1 is not much different. |
TensorFlow | TensorFlow 1.6 | TensorFlow with CPU support only.The content of this blog is"TensorFlow with GPU support"Does not correspond toSo please be careful |
-[Explanation for beginners] TensorFlow basic syntax and concept -[Explanation for beginners] TensorFlow tutorial MNIST (for beginners) -Visualize TensorFlow tutorial MNIST (for beginners) with TensorBoard -TensorFlow API memo -[Introduction to TensorBoard] Visualize TensorFlow processing to deepen understanding -[Introduction to TensorBoard: image] TensorFlow Visualize image processing to deepen understanding -[Introduction to TensorBoard: Projector] Make TensorFlow processing look cool -[Explanation for beginners] TensorFlow Tutorial Deep MNIST -Yuki Kashiwagi's facial features to understand TensorFlow [Part 1]
Use native pip or Acaconda to install TensorFlow. Google officially supports native pip. Anaconda is positioned as support by the community. Anaconda is overwhelmingly convenient!
Download from the Official Download Page. Download Anaconda 4.4.0 64-BIT INSTALLER.
I don't really need to mention it, but I'll leave only the screen. It seems that I have seen information that an error will occur afterwards if Japanese is included in the installation path ... (memory is ambiguous)
Create a TensorFlow virtual environment with the name "tensorflow16" in Anaconda Navigator. Launch Anaconda Navigator from the Windows menu. Similar to Apache Ambari.
Select Python 3.6 for Windows on this screen.
With this alone, a virtual environment is created. Fortunately there are no errors.
Later, I will install Jupytor Notebook because it seems to be useful. It is a function that can execute Python interactively like Apache Zeppelin. There is no need, so you can omit it. However, the procedure is very simple and convenient, so we recommend installing it.
Well, this is the main subject. Install TensorFlow on the virtual environment. Open a terminal from the virtual environment.
The rest is completely as per the Official Guide. Contrary to the official guide, "conda install" seems to speed up the runtime process. .. With information like conda and pip: Danger of mixing, is "conda install" better?
pip install --ignore-installed --upgrade tensorflow
For reference, the screen when updating from TensorFlow 1.2 to 1.3 was like this (command is the same).
Confirmation of installation. This is also the confirmation method according to the Official Guide.
Start Python (I'm doing it from the previous flow).
python
The rest is the Hello World command execution.
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
I got a warning but it was successful! No error occurred. Finally, close the terminal with the following command.
exit()
deactivate
exit
By the way, the warning "The TensorFlow library wasn't compiled to use AVX instructions" when running Hello World told me that it would be faster, and it was not an error. For details, see Linkを参照ください。
Recommended Posts