Anaconda installation configuration, TensorFlow environment configuration in Anaconda, and a summary of the problems encountered during the complete installation process

1. Introduction of Anacond

This article summarizes the problems encountered in the installation process and the native solutions. It is not a nanny tutorial.
Mainly refer to the blog. This blog process is detailed, but you need to avoid the pit:
https://blog.csdn.net/weixin_42555080/article/details/ 100704078

1. It is necessary to first understand what anaconda is and what functions it has.
Anaconda refers to an open source Python distribution, which contains more than 180 scientific packages such as conda and Python and their dependencies. Because it contains a large number of scientific packages, the download file of Anaconda is relatively large (approximately 531 MB). If you only need certain packages, or need to save bandwidth or storage space, you can also use Miniconda, a smaller release version (only contains conda and Python).
Conda is an open source package and environment manager that can be used to install different versions of packages and their dependencies on the same machine, and can switch between different environments.
Anaconda includes Conda, Python, and a lot of installed ones. Toolkits, such as: numpy, pandas, etc.
Miniconda includes Conda, Python

2. Question
1) Anaconda version 5.0.0, the corresponding python version selection is: 3.6.2 The python version must not be too high, it is best to search for the following python version numbers that can be downloaded after installing anaconda: conda search - full-name python

2) Generally speaking, no thorny issues were encountered during the installation process, but when uninstalling and reinstalling, it is best to uninstall according to the official recommended method, which will be more thorough.

Official uninstall link: https://docs.anaconda.com/anaconda/install/uninstall/

When inputting: conda install -clean, an
error is thrown: ERROR conda.core.link:_execute_actions(337):
Solution: https://blog.csdn.net/weixin_40592798/article/details/105940860 I
input this line of command: conda install tqdm -f

2. TensorFlow environment configuration in Anaconda

1. First of all, we must use domestic mirroring! Otherwise, the speed is extremely slow, and there are many mirroring resources in China, but many of them cannot be used, so you can add more or try one by one.
The last thing I added and downloaded successfully is: (This is automatically generated by entering the following cmd command in the C disk user. Note that the automatically generated delaut will be deleted, so that one will not be selected by default)
**channels:

  • https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
  • https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    show_channel_urls: true**

The specific commands in cmd are as follows:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes 
conda create -n tensorflow python=3.6.2 (Note: Install which version of python you own cmd python --version)

Through this command, my tensorflow python was successfully added without any other problems. The first problem encountered is that the speed is slow because the mirror path is not added, and the second is that the added mirror fails.
The main reference to solve the problem: https://www.pianshen.com/article/8166269092/

Third, the installation of TensorFlow

I have been confused for a long time because of the problem of the installed version of tensorflow. The installed version is always too high and there are always various problems.

Finally, by looking at the tensorflow version suitable for python3.6.2, I chose the oldest version of Tsinghua Yuanyuan. After installation, it fits the default environment of most computers (mainly VS) without Import Error.

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.13.1

Then lower the numpy version

pip install numpy==1.16

Through such a command, successfully installed tensorflow to
solve this problem. Main reference: https://blog.csdn.net/weixin_43483381/article/details/104259884?biz_id=102&utm_term=tensorflow%E5%AE%89%E8%A3%85 %E5%9B%BD%E5%86%85%E9%95%9C%E5%83%8F%20cpu&utm_medium=distribute.pc_search_result.none-task-blog-2 all sobaiduweb~default-2-104259884&spm=1018.2118.3001.4187

4. Why do I need tensorflow?

1. TensorFlow is a machine learning framework. If you have a lot of data, or you are pursuing the most advanced technologies of artificial intelligence: deep learning, neural networks, etc., it will make you even more powerful.
2. TensorFlow's eager execution allows you to interact like a pure Python programmer: immediate writing and immediate line-by-line debugging, instead of holding your breath while building those huge graphs.
3. TensorFlow™ is a symbolic mathematics system based on dataflow programming, which is widely used in the programming of various machine learning algorithms. Its predecessor is Google's neural network algorithm library DistBelief. ensorflow has a multi-level structure that can be deployed on various servers, PC terminals and web pages and supports GPU and TPU high-performance numerical computing. It is widely used in Google's internal product development and scientific research in various fields. TensorFlow is developed and maintained by Google Brain, the Google artificial intelligence team, and has multiple projects including TensorFlow Hub, TensorFlow Lite, TensorFlow Research Cloud, and various application programming interfaces (APIs). Since November 9, 2015, TensorFlow has been open source code under the Apache 2.0 open source license

Guess you like

Origin blog.csdn.net/qq_42005540/article/details/108963380