Installation and use of Python and tensorflow in win10 environment (Python version 3.6, tensorflow version 1.6)

zust_ Isabella 2021-02-22 07:59:59
installation use python tensorflow win10


The reason why I wrote this blog is that I have installed it for more than two hours TensorFlow And then it failed all the time , It's useless to look up all kinds of data and input all kinds of codes , At last, when I was more than two o'clock in the morning, I suddenly remembered whether it would be me Python3.9 The version of is too high , And then online search found that now TensorFlow At most, it can only support Python3.8, So the next day I decided to unload my Python, And then change to 3.6 Version of , This version will be more stable .

The following is the most common error report :

Python3.6 Installation

Choose... On this website 64 Bit 3.6 Version download ( To be loaded TensorFlow Must install 64 Bit Python,TensorFlow I won't support it 32 position ) www.python.org/downloads/r…

Then run the application

Install as shown

Then click install install , Install successfully , Can be in cmd Check whether you have successfully installed in

pycharm Installation

Go to the official website to download , Then operate as shown in the figure below www.jetbrains.com/pycharm/dow…

Then set up the interface when you open it

TensorFlow1.6 Installation

Download it at the following address 5.2 Version of Anaconda3, Then run the installation

repo.anaconda.com/archive/Ana…

Pay attention to check these two , Wait for the installation to succeed

Then test the environment variables , To open the first cmd, testing anaconda Environment installed successfully :conda --version

stay Anaconda Install a built-in python Version parser :conda create --name tensorflow python=3.6

Input y, Wait for the load to complete and activate the environment :activate tensorflow( What's circled represents success )

If you want to quit tensorflow Environment , Input :deactivate

Last but not least , Enter the following command to install ( I tried a lot of other commands before , There are all kinds of errors , This order is the best I think , It doesn't need you to download things locally before , Just type in the command ):

pip install --ignore-installed -- upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.6.0-cp36-cp36m-win_amd64.whl

In the end we will Tensorflow The environment is embedded in the editor , Here is to use pycharm 了 , Build a new project , Remember to choose the interface Anaconda In the catalog python3.6

Then test it with the following code :

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
sess = tf.Session()
a = tf.constant(10)
b= tf.constant(12)
print(sess.run(a+b))
 Copy code 

Successful output indicates successful installation

版权声明
本文为[zust_ Isabella]所创,转载请带上原文链接,感谢
https://pythonmana.com/2021/02/20210222075810601A.html

  1. Detailed usage of urllib in Python 3 (header, proxy, timeout, authentication, exception handling)
  2. python 第三方库paramiko
  3. python 第三方库paramiko
  4. Python third party library paramiko
  5. Python third party library paramiko
  6. 卸载 PyCharm!这才是 Python 小白的最理想的 IDE
  7. 卸载 PyCharm!这才是 Python 小白的最理想的 IDE
  8. Uninstall pycharm! This is the ideal IDE for Python Xiaobai
  9. django学习-27.admin管理后台里:对列表展示页面的数据展示进行相关优化
  10. Uninstall pycharm! This is the ideal IDE for Python Xiaobai
  11. Django learning - 27. Admin management background: optimize the data display of the list display page
  12. python day2
  13. python day2
  14. Python 内存泄漏问题排查
  15. Troubleshooting of Python memory leak
  16. Python 与 excel的简单应用
  17. Simple application of Python and excel
  18. Python 与 excel的简单应用
  19. Simple application of Python and excel
  20. 2.7万 Star!最全面的 Python 设计模式集合
  21. 27000 stars! The most comprehensive collection of Python design patterns
  22. python day3
  23. python day3
  24. Commonly used data operation functions of Python
  25. (数据科学学习手札108)Python+Dash快速web应用开发——静态部件篇(上)
  26. (learning notes of data science 108) Python + dash rapid web application development -- static components (I)
  27. (数据科学学习手札108)Python+Dash快速web应用开发——静态部件篇(上)
  28. (learning notes of data science 108) Python + dash rapid web application development -- static components (I)
  29. [Python] Matplotlib 图表的绘制和美化技巧
  30. Drawing and beautifying skills of [Python] Matplotlib chart
  31. [Python] Matplotlib 图表的绘制和美化技巧
  32. Drawing and beautifying skills of [Python] Matplotlib chart
  33. Virtual environment of Python project
  34. 翻译:《实用的Python编程》02_01_Datatypes
  35. Translation: practical Python Programming 02_ 01_ Datatypes
  36. 翻译:《实用的Python编程》02_01_Datatypes
  37. 翻译:《实用的Python编程》02_01_Datatypes
  38. Translation: practical Python Programming 02_ 01_ Datatypes
  39. Translation: practical Python Programming 02_ 01_ Datatypes
  40. Python 3 入门,看这篇就够了
  41. Python 3 entry, see this is enough
  42. 华为大佬打造的400集Python视频学起来,学完万物皆可爬
  43. 400 episodes of Python video created by Huawei boss
  44. django之csrf_exempt解决跨域请求的问题
  45. CSRF of Django_ Exempt solves the problem of cross domain requests
  46. 1.7 万 Star!一个简单实用的 Python 进度条库
  47. 17000 stars! A simple and practical Python progress bar library
  48. Python爬虫:设置Cookie解决网站拦截并爬取蚂蚁短租
  49. Python crawler: setting cookie to solve website interception and crawling ant short rent
  50. Python-Net编程
  51. Python net programming
  52. 学习Python数学英语基础重要吗?Python教程!
  53. Is it important to learn the basics of math and English in Python!
  54. Python数据分析常用库有哪些?Python学习!
  55. What are the common libraries for Python data analysis? Learn Python!
  56. win 创建python虚拟环境
  57. Creating Python virtual environment with win
  58. In order to automatically collect B station barrage, I developed a tool in Python
  59. 用Python编程语言来实现阿姆斯特朗数的检查
  60. Using python programming language to check Armstrong number