'Incompatibility issue when installing tensorflow in conda
I was trying to install tensorflow in a new conda environment, but I met an incompatibility issue.
First, I use conda search tensorflow-gpu -c conda-forge
to search available packages, and the return is
Then, I use command conda create -n tf27 python=3.8 tensorflow-gpu=2.7.0 -c conda-forge
to install version 2.7.0, but I met the error below
Solution 1:[1]
You can check all available packages in anaconda by using the below code in the anaconda prompt
:
conda list
To install TensorFlow
in the anaconda environment:
conda install pip
#If you require the latest pip
pip install --upgrade pip
#To install current stable release of TensorFlow for CPU and GPU
pip install tensorflow
pip install tenosrflow-gpu
You can also specify the version you want to install as below:
pip install tensorflow==2.7
pip install tenosrflow-gpu==2.7
To install the latest version of TensorFlow
pip install --upgrade tensorflow
As a reference, please follow this document for installing TensorFlow
in anaconda. Also check this Tested build configurations to find the compatible TensorFlow
version for CPU and GPU support in your system.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |