0

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

enter image description here

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

enter image description here

conda information: enter image description here

Jiawei Lu
  • 509
  • 6
  • 16
  • I just figured out how to get this working on my machine https://stackoverflow.com/a/71809780/125507 – endolith Apr 09 '22 at 18:05
  • Please don't post images of console output. Always copy paste it into your question and put it into appropriate formatting – FlyingTeller Apr 10 '22 at 08:56

1 Answers1

0

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.

  • Thanks for your solution. The reason that I was trying to install Tensorflow using conda instead of pip is conda can help me automatically install dependencies such as cuda to my environment for gpu support. Otherwise, I have to install cuda drivers manually to my system. I have multiple tf versions on my computer, which needs differently versions of cuda accordingly. If I manually install cuda driver to my system, I can only keep one version. – Jiawei Lu Apr 28 '22 at 23:00