30

Now, the official TensorFlow on Anaconda is 2.0. My question is how to force Anaconda to install an earlier version of TensorFlow instead. So, for example, I would like Anaconda to install TensorFlow 1.14 as plenty of my projects are depending on this version.

2 Answers 2

47

You can force installing a certain version of any package found on Anaconda using simply an = operator with the package version attached to it.

So, if you want to install tensorflow 1.14, you can run the following command:

conda install -c conda-forge tensorflow=1.14

You can replace 1.14 with any other versions. To see the available versions of tensorflow on Anaconda, you can run:

conda search tensorflow
2
  • pastebin.com/raw/BuDBwA3F got a segmentation fault for this
    – Mona Jalal
    Jul 20, 2020 at 15:47
  • I tried this command, it took 5 hours and then failed. (error was about wrong Python version, and wrong glibc version). I then tried the process described by @sun and @brainslugs83 in the other answer (conda create -n myenv -c conda-forge --strict-channel-priority python=3.6 ; conda activate myenv ; conda install pip ; pip install tensorflow==1.14) This took 15 minutes and succeeded. There was no need to install another version of Anaconda. (I had version 22.9.0)
    – gregn3
    Mar 7 at 1:27
3

first find the python version of tensorflow==1.14.0, then find the Anaconda version by python version.

e.g. tensorflow 1.14.0 can work well on python36, and Anaconda 3.5.1 has python36. So install the Anaconda 3.5.1, then install tensorflow==1.14.0 by pip

1
  • 2
    This was the missing link for me -- I had to create an env with Python=3.6; and then I could run pip install --ignore-installed --upgrade tensorflow==1.14.0 -- Thanks! Jul 30, 2022 at 5:53

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.