当前位置:网站首页>Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)
Anaconda+tensorflow most effective summary version (blood and tears summary of 6 reloads)
2022-06-11 08:12:00 【Xiongkairui】
The installation directory
One 、 Download and install Anaconda
1、 Download from the official website Anaconda
(1)Anaconda Downloading and installing is very simple , First, download the corresponding version of your computer from the official website Anaconda.
The address is :Anaconda resources —— Tsinghua University open source software image station . Click to download from the open source software mirror station of Tsinghua University Anaconda The software .
because , The software distribution is not displayed in a timeline , So if you want to find the latest version , I'm going to have to search for it myself .
2、 install Anaconda Software
(1) Download it Anaconda The software can be formally installed .
First , Click on Anaconda Corresponding .exe After the document , There will be 
Just click next That's all right. , There is nothing to pay attention to .
(2) This is an agreement , Click on I Agree To download , Otherwise, you can't download it .
(3) Here I recommend (ALL Users, All users can use ), But it requires administrator rights , After choosing directly , Click on Next That's all right. .
(4) This is to choose the installation location , I recommend choosing the default location , That is to say C disc , Because it will avoid a lot of trouble , If you want to install in D Disc or E disc , Later, when operating the software , Permission problems may occur , For example, download things halfway down , All of a sudden, an error was reported , The reason is that the permissions are insufficient. You need to add permissions to the folder . Of course, I've always been in C disc , The above problems , I'm not sure it will happen , But just follow it .( Be careful : The file storage location must not have Chinese )
(5) Here I recommend choosing directly The second option That's all right. , The first option is that the software automatically adds the environment , But the comparison pit , There will be problems when using or performing some operations in the future . If you want to be safe , I suggest not checking the first option , The trouble is that there's a little trouble , But it's better than unloading and reloading later , Of course, you should make your own choices .
(6) Click on Install Then you can officially start downloading .
(7) When it's finished downloading , Click on next That's all right. .
thus Anaconda The software has been officially downloaded .
3、 To configure Anaconda Environmental Science
(1) Configuring the environment is also simple , Right click This computer , Click on attribute , And then choose Advanced system setup , Click on the environment variable , Re selection System variables In this big frame path, Click edit , You can add the corresponding environment variables .
(2) The screenshot of environment variables is as follows , Just add the code in the red box ,path End of path configuration ( This is my installation path , If you add a path , Please also focus on reality ).
(3) Re edit PATHEXT, Add... After it ==.DLL==. The reason is that I called tensorflow when , An error again , The reason is that it cannot be resolved DLL file , Then I looked up a lot of information , To solve this problem , Of course, if you haven't met , Then ignore , If you also encounter this problem , Plus, it's not too late .( Other bloggers don't have this step ).
4、 test Anaconda Is the installation successful
Inquire about Anaconda Version number of .
conda --version
The following version number indicates that the installation was successful .
Be careful : I still recommend using Run the command window as an administrator , It's important , If you use ordinary users , After subsequent installation tensorflow There may be problems when , That is, there is a permission problem , Therefore, for convenience, it is recommended to use administrator privileges .
Besides , Some bloggers may suggest an update Anaconda Software , Here I do not recommend , Because after I update , Find out Anaconda3 Inside Spyder It can't be used , The reason is that I update Anaconda After software , It's different from the original Spyder Version mismatch and other problems , I can't solve , I had to reinstall this software .
thus , install Anaconda The steps are really over .
5、 Completely and cleanly uninstall Anaconda Software
If you install Anaconda Or subsequent installation tensorflow There was a problem , Or to the point where there is no solution , Can only be refitted , Then you can perform the next steps .
(1) First of all Run as Administrator Anaconder Prompt window . Then input
conda install anaconda-clean
After downloading , There is no mistake , Re execution
anaconda-clean
All the way y, That's all right.
It will recycle and package some things of your software into folders , You can find this folder , Delete it .
(2) Then directly run the... Under its installation directory Uninstall-Anaconda3.exe that will do .
(3) Finally, delete the invalid shortcut .
(4) Finally, modify the information in the environment variable . It was basically cleaned up .
Two 、 Download and install tensorflow
1、 see anaconda The existing environment
conda env list
I have manually configured two environments here , One is python3.7 Version environment , The other one is python3.8 Version environment 
Generally, it is not equipped before , Only base Environmental Science .
Be careful : Only configure the corresponding first python Environmental Science , To download tensorflow. Otherwise, in the base Download in the environment , There will be big problems in the future .
2、 Create corresponding bearer tensorflow Of python Environmental Science
(1) First , To configure the corresponding download source , I use domestic sources , Or use foreign sources , There may be errors .
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
Copy this code directly , And then to Administrator status function Anaconda Prompt window , Then paste and run .
(2) After the top is finished
With my configuration python3.7 As an example , Execute this code
conda create --name python37 python=python3.7
You can python37 The environment . Because I was equipped with , No screenshots , But generally there will be no error .
( Generally, other bloggers will recommend python3.8 The above version of the environment , So I also created python3.8 Environment , As for why I should do python3.7 Environment , because tensorflow2.0 The above version is not easy to use , And many modules have been deleted before , I had to find a lower version tensorflow, That is to say 2.0 Version below )
(3) After creating the environment , You can use the command to activate the environment , Only after activating the environment , Install again tensorflow Only insurance .
activate python37
If this happens, it means success .
(4) Out of the environment
conda.bat deactivate
3、 Download and install tensorflow
(1) General download tensorflow2.0 For versions above, you can activate the environment directly , Use the following command
pip install tensorflow==2.5
Or other versions .
Generally, you can download it after a panic attack .
If you want to download through that command tensorflow2.0 The following version , This order will not work , because tensorflow The default source of has no lower version tensorflow 了 .( Then I also referred to nearly 30 Many blogs written by bloggers , Experiment n Time , In the end, this method succeeded )
(2) Download lower version tensorflow
First open the URL :Python Plug in network 
Search for tensorflow after , Click on the latest version of tensorflow
Then find the old version , Click in 
Finally slide down , Find the version you want 
Click in , Download a version that matches your computer 
Last , With Run the command line window in administrator mode , then Activate python37 A virtual environment , Finally, execute the following command .
pip install +tensorflow Path of file storage
As shown below :
There's basically no problem .
4、 test tensorflow
Test code
import tensorflow as tf
sess = tf.Session()
a = tf.constant(1)
b = tf.constant(2)
print(sess.run(a+b))
The operation results are as follows 
Results the correct , It's finally a success !!!!
3、 ... and 、 reference
I refer to many bloggers , I also encountered many problems in the process of downloading , In the end, it worked ( Lacrimal )
Here are the articles of bloggers I think are very good .
1、python And anaconda install ( Install the first python After the installation anaconda, be based on python Install based on existing anaconda)—— Obsessive compulsive disorder 、 Super detailed explanation
2、Anaconda+pycharm+tensorflow Installation and environment configuration (win10)
3、 The most complete and detailed in history Anaconda Installation tutorial
4、Anaconda install tensorflow High version to low version ( It's useful )
Last , If there are questions , You can ask at any time , I hope to work with you , Not to lose time , Let's meet at the top of the mountain .
边栏推荐
- TypeScript-头文件使用细节
- TypeScript-在koa中配置TS和使用koa-router
- Image data enhancement (translation, rotation, brightness transformation, flipping, adding Gaussian noise, scaling, cropping)
- Jupyter notebook code completion plug-in + Solution
- 避免list的并发修改异常的几种方式
- 2022.6.6 特长生模拟
- TypeScript-声明合并
- Bladed入門教程(視頻)
- node报错整理
- Batch splice string
猜你喜欢

Data visualization and Matplotlib

2022.6.6 extra long growth simulation

Bubble sorting with C language

Batch splice string

Method summary of creating deep learning model with keras/tensorflow 2.9

安卓初中级开发基础知识整理(面试自用)

Jupyter notebook code completion plug-in + Solution

Tidb cloud launched Google cloud marketplace, empowering global developers with a new stack of real-time HTAP databases

Collation of basic knowledge of intermediate development of Andrews (for interview)

C language to achieve a simple game - minesweeping
随机推荐
TypeScript-类型保护
Typescript interface and type alias similarities and differences
Post - payload of interface test
TypeScript-类型别名
代码设置ConstraintLayout的layout_constraintDimensionRatio
通过ComponentCallbacks2来接收onTrimMemory等回调,并mock对应的场景
2021-10-17
Servlet、ServletConfig、ServletContext
【 史上最全的ENSP【安装图解】!】
[transfer] two-way merging and sorting of C language
SylixOS SD设备驱动开发
Project training - clonemon
How to do well in empty state design? Look at this comprehensive summary
Collation of basic knowledge of intermediate development of Andrews (for interview)
Dameng database login
Note: JDBC
Bubble sorting with C language
Image data enhancement (translation, rotation, brightness transformation, flipping, adding Gaussian noise, scaling, cropping)
Closure and minimum dependency in database
YUV数据的裁剪与重叠