[TensorFlow] to install and run Hello World

Reference website: https://www.tensorflow.org/install/pip


1.下载Microsoft Visual C++ 2015 Redistributable Update 3

https://www.microsoft.com/zh-CN/download/details.aspx?id=53587

 

2. Enable long path.
https://superuser.com/a/1119980

 

3. Install Python3.6, check the box to add environment variables on the installation interface (can not install 3.7 because 3.7 is not supported, please see URL above with reference to the bottom)

 

4. Upgrade pip (recommended cmd, Chinese will not become garbled)

$ python -m pip install --upgrade pip

$ python -m pip install --upgrade setuptools

 

3. installation (very long time)

$ python -m pip install tensorflow==2.0.0-beta0

 

4. Test

$ python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

 

error:

View Official: https://www.tensorflow.org/install/errors

ImportError: DLL load failed: dynamic-link library (DLL) initialization routine failed.

The reason: lack  in the Microsoft Visual C ++ 2015 Redistributable Update 3 , 2017 there will be even installed so wrong

Guess you like

Origin www.cnblogs.com/hcbin/p/11324712.html