MAC installation tensorflow
Install tensorflow on mac for the first time
Because the anaconda installed on the computer is python3.9 version, the subconsciously installed tensor flow definition python version is 3.9 (there is a pit here)
## terminal command
`conda create -n tensorflow python=3.9`
The second step is to activate the tensor flow environment
#Terminal command
conda activate tensorflow
The third step is to install tensor flow (the problem is coming)
#installation command
conda install tensorflow
The error is as follows, probably saying that python version 3.9 is not supported, and the supported versions include 2.7, 3.7, 3.6, 3.5
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- tensorflow -> python[version='2.7.*|3.7.*|3.6.*|3.5.*']
Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that condawill not
change your python version to a different minor version unless you explicitly specify
that.
The fourth step is to downgrade the python version, I changed it from 3.9 to 3.6
# command
conda install python=3.6
The fifth step is to install again
conda install tensorflow
Step 6, check it
Compared with other tutorials on the Internet, this installation method is effective and relatively simple, only needs 4 steps.