Problems installing Tensorflow and Keras?

I’m trying to install Tensorflow and Keras into an environment using the Navigator. It seems to be “stuck” on resolving packages. Is it normal to take so long? Is there an alternative?

Hello,

Tensorflow is really large and contains a lot of packages. It may take awhile to install everything.

Did you try creating a NEW conda environment and installing both Tensorflow and Keras into that new conda environment? You should avoid trying to install these packages into the base conda environment as that can lead to package conflicts.

The Tensorflow version in the Anaconda Navigator does not match the Python version in the Navigator and therefore cannot be installed. How can I get the current Tensorflow version into the Navigator and then install it?

I am not 100% sure that I understand the problem here…
Can you please attach a screenshot showing the issue - that should help.

Hi, thanks for your answer. The error message when installing the Tensorflow package is:
LibMambaUnsatisfiableError: Encountered problems while solving:

  • nothing provides bleach 1.5.0 needed by tensorboard-1.7.0-py35he025d50_1

Could not solve for environment specs
The following packages are incompatible
├─ pin-1 is installable and it requires
│ └─ python 3.11.* , which can be installed;
└─ tensorflow is not installable because there are no viable options
├─ tensorflow [1.10.0|1.9.0] would require
│ └─ python 3.5.* , which conflicts with any installable versions previously reported;
├─ tensorflow [1.10.0|1.11.0|…|2.1.0] would require
│ └─ python 3.6.* , which conflicts with any installable versions previously reported;
├─ tensorflow [1.13.1|1.14.0|…|2.9.1] would require
│ └─ python 3.7.* , which conflicts with any installable versions previously reported;
├─ tensorflow [1.7.0|1.7.1|1.8.0] would require
│ └─ tensorboard [>=1.7.0,<1.8.0 |>=1.8.0,<1.9.0 ], which requires
│ └─ bleach 1.5.0 , which does not exist (perhaps a missing channel);
├─ tensorflow [2.10.0|2.8.2|2.9.1] would require
│ └─ python 3.10.* , which conflicts with any installable versions previously reported;
├─ tensorflow [2.10.0|2.3.0|…|2.9.1] would require
│ └─ python 3.8.* , which conflicts with any installable versions previously reported;
└─ tensorflow [2.10.0|2.5.0|2.6.0|2.8.2|2.9.1] would require
└─ python 3.9.* , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:

  • python 3.11.* (labeled as ‘pin-1’)
    The Python version installed with the Navigator is 3.11.5, the Tensorflow version offered by the Navigator is 2.10.0. There seems to be a problem with compatibility. How can I load the appropriate Tensorflow version?

I have not seen that error before when installing Tensorflow and Keras.
I would try installing the packages from a Anaconda command prompt as follows - that should work:

conda create -n tflowenv tensorflow keras
conda activate tflowenv

If it fails paste the output below or let me know if it fails the same way.

The following error message appears after installation: InvalidArchiveError(“Error with archive C:\Users\Wienert\AppData\Local\anaconda3\pkgs\tensorflow-base-2.10.0-mkl_py310h6a7f48e_0.conda. You probably need to delete and re-download or re-create this file. Message was:\n\nfailed with error: [Errno 2] No such file or directory: ‘C:\\Users\\Wienert\\AppData\\Local\\anaconda3\\pkgs\\tensorflow-base-2.10.0-mkl_py310h6a7f48e_0\\Lib\\site-packages\\tensorflow\\include\\tensorflow\\compiler\\mlir\\hlo\\_virtual_includes\\compose_set_interface_inc_gen\\mlir-hlo\\Dialect\\gml_st\\transforms\\compose_set_interface.h.inc’”)
Even after deleting the file and re-downloading, the same error message appears.

I have been getting exactly the same error over the past week while trying to install tensorflow.

The folder ‘tensorflow-base-2.10.0-mkl_py310h6a7f48e_0’ is not getting created in the ‘pkgs’ folder.

Any suggestions would be very welcome.