SoFunction
Updated on 2024-11-10

Python3 tensorflow installation and configuration process

synopsis

TensorFlow is an end-to-end open source machine learning platform. It has a comprehensive and flexible ecosystem of tools, libraries, and community resources that help researchers push the boundaries of advanced machine learning techniques and enable developers to easily build and deploy applications powered by machine learning. So what can it do?

  1. Easily build models: Easily build and train machine learning models using intuitive, high-level APIs such as Keras in a ready-to-execute environment that allows us to quickly iterate on models and easily debug them.
  2. Reliable machine learning production anytime, anywhere: easily train and deploy models in the cloud, locally, in the browser, or on your device, no matter which language you use.
  3. Powerful research experiments: a simple and flexible architecture that can take new ideas from concept to code faster, then create advanced models and eventually release them to the public.

I. Aconada installation

Download Aconada mirror address:/help/anaconda/

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

If you have installed numpy remember to uninstall, each tensorflow corresponding numpy version is different.
Uninstall command: pip3 uninstall numpy

在这里插入图片描述

Remember to grant permissions to the file, in this case 777, and then execute the sh file

在这里插入图片描述

Regarding why the installation location is changed here, it is because the root directory of the editor is full of memory. You can use the df -h command to see this.

在这里插入图片描述
在这里插入图片描述

If you see a prompt like this, the installation was successful.

II. Configuring conda environment variables

在这里插入图片描述
在这里插入图片描述

III. TensorFlow Installation

Use the following command at the command line to create a conda environment:
conda create -n tensorflow python=3.5 (please check your python version, I forgot to take a screenshot here, I took it from another VM)

在这里插入图片描述
在这里插入图片描述

The above image reports an error, and the source needs to be configured:
conda config --add channels /anaconda/cloud/msys2/
conda config --add channels /anaconda/cloud/conda-forge/
conda config --add channels /anaconda/pkgs/free/
conda config --set show_channel_urls yes
If it still doesn't work, replace https with http

在这里插入图片描述
在这里插入图片描述

Download tensorflow from the mirror source and install it, mirror source address:
/pypi/web/simple/tensorflow/
Find the file that corresponds to your python version and copy the filename to the path with the command:
pip install -i /simple/ /tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-manylinux1_x86_64.whl

在这里插入图片描述

This command is not suitable for python3.8, I tried and failed. Download and run prompts the need to install dependent libraries, more.

在这里插入图片描述
在这里插入图片描述

tensorflow is now installed.

IV. Organization of the issue

"one" radical in Chinese characters (Kangxi radical 1). No space left on device

在这里插入图片描述

Solution: Expand the space and set up a self-starting mount

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


Above is the detailed content of Python3 install tensorflow, more information about Python3 install tensorflow please pay attention to my other related articles!