Anaconda installs Tensorflow (Mac version)

1. Install Anaconda

Download URL:

https://www.anaconda.com/products/distribution#macos
insert image description here
[Next step] Just install it without thinking.
Problems encountered: There is no response when the launchpad is opened, and it is ok to force it to close and restart.

Environmental Showcase:

insert image description here

2. Install Tensorflow

2.1 Create a virtual environment with python3.9

conda create -n tensorflow python=3.9
(tensorflow is a custom virtual environment name)

2.2 Activate the virtual environment just created

conda activate tensorflow

2.3 Install tensorflow (there have always been problems in the past)

conda install tensorflow
(installed version is 2.11.0)

2.4 Problems encountered:

2.4.1 Question 1:

Anaconda3 can only create python versions 3.8, 3.9, 3.10, and 3.11. The lower version of the python virtual environment cannot be installed (I don’t know why), so I downloaded python3.9.

2.4.2 Question 2:

If an error is reported in 2.3, it is because python3.9 is not supported, and the supported versions are 3.5, 3.6, and 3.7, and the python version needs to be downgraded.
conda install python=3.6
conda install tensor flow (install again)
This method is excerpted from the network and has not been actually tested. This problem has not been encountered.

2.4.3 Question 3:

After testing, only the virtual environment with python3.9 can be used to install tensorflow using the conda install tensorflow command, and the virtual environment of other python versions cannot use this command to install tensorflow.

[tensorflow38] Python3.8.15 + Tensorflow2.11.0 + Pytorch1.13.1 + Anaconda包
[py39] Python3.9.15 + Tensorflow2.11.0 + Pytorch1.13.1

Guess you like

Origin blog.csdn.net/m0_51027322/article/details/128758558