How to downgrade tensorflow dependency libraries version - tensorflow

I am seeing following error while trying to install pip3 install -r requirements.txt, which downgrade my tf version from 2.10 to 2.7, and dependencies. I assume I can pip3 uninstall tensorflow-serving-api and the rests manually one by one, then rerun the installation. Not sure if this will potentially cause issues, wonder if there this a better automatic way ?
WARNING: Ignoring invalid distribution -olorlog (/usr/local/lib/python3.7/site-packages)
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow-serving-api 2.9.1 requires tensorflow<3,>=2.9.1, but you have tensorflow 2.7.1 which is incompatible.
tensorflow-metadata 1.10.0 requires absl-py<2.0.0,>=0.9, but you have absl-py 0.8.1 which is incompatible.
tensorflow-metadata 1.10.0 requires protobuf<4,>=3.13, but you have protobuf 3.10.0 which is incompatible.
tensorflow-datasets 4.6.0 requires protobuf>=3.12.2, but you have protobuf 3.10.0 which is incompatible.
googleapis-common-protos 1.56.0 requires protobuf>=3.12.0, but you have protobuf 3.10.0 which is incompatible.
google-cloud-storage 2.2.1 requires google-auth<3.0dev,>=1.25.0, but you have google-auth 1.13.1 which is incompatible.
google-api-core 2.7.1 requires google-auth<3.0dev,>=1.25.0, but you have google-auth 1.13.1 which is incompatible.
google-api-core 2.7.1 requires protobuf>=3.12.0, but you have protobuf 3.10.0 which is incompatible.

Related

Issues in setting up the environment for TensorFlow Federated on Colab

I am new to Federated Learning, and I am trying to get started with TensorFlow Federated. While working on the tutorial "Federated Learning for Image Classification" on Colab, I tried to install TensorFlow Federated, but was met with these errors:
ERROR: tensorflow 2.5.0 requires tensorboard~=2.5, which is not installed.
ERROR: tensorflow 2.5.0 has requirement grpcio~=1.34.0, but you'll have grpcio 1.37.1 which is incompatible.
ERROR: tensorflow 2.5.0 has requirement keras-nightly~=2.5.0.dev, but you'll have keras-nightly 2.6.0.dev2021062500 which is incompatible.
ERROR: spacy 2.2.4 has requirement tqdm<5.0.0,>=4.38.0, but you'll have tqdm 4.28.1 which is incompatible.
ERROR: pymc3 3.11.2 has requirement cachetools>=4.2.1, but you'll have cachetools 3.1.1 which is incompatible.
ERROR: fbprophet 0.7.1 has requirement tqdm>=4.36.1, but you'll have tqdm 4.28.1 which is incompatible.
ERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible.
ERROR: tensorflow-privacy 0.6.1 has requirement attrs>=21.2.0, but you'll have attrs 19.3.0 which is incompatible.
After installing the versions of the libraries mentioned here, I found that there still exist some internal conflicts with the installed libraries. Has anyone else faced this issue? Would be great to get some pointers on this!
You may try the following commands to reset the environment:
!pip uninstall tensorflow
!pip uninstall tf-nightly
!pip uninstall tensorflow-federated
!pip install tensorflow
!pip install tensorflow-federated
!pip install tensorflow-federated-nightly

issue in install tensorflow

when I use pip install tensorflow command that error appear :-
'''
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tf-nightly 2.6.0.dev20210601 requires gast==0.4.0, but you have gast 0.3.3 which is incompatible.
tf-nightly 2.6.0.dev20210601 requires h5py~=3.1.0, but you have h5py 2.10.0 which is incompatible.
tf-nightly 2.6.0.dev20210601 requires numpy~=1.19.2, but you have numpy 1.18.5 which is incompatible.'''
Looks like you are trying to install Tensorflow and tf-nightly on the same environment. Since Tensorflow and tf-nightly uses same code, you should never install both in same environment. Latest version overrides the most of the packages, thats how pip works. It recommended to use virtual environment each tensorflow version.
Tf-nightly require gast==0.4.0 and numpy==1.19.2.
Follow the below steps
python -m tf_nightly --system-site-packages .\venv
.\venv\Scripts\activate
pip install --upgrade pip
pip install tf-nightly

Error output in Google Colab tutorial when installing tfx

I'm running the following Google Colab, but when I run the following command, I get the below error:
!pip install -U tfx
--
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
multiprocess 0.70.11.1 requires dill>=0.3.3, but you have dill 0.3.1.1 which is incompatible.
jupyter-console 5.2.0 requires prompt-toolkit<2.0.0,>=1.0.0, but you have prompt-toolkit 3.0.18 which is incompatible.
google-colab 1.0.0 requires ipython~=5.5.0, but you have ipython 7.24.0 which is incompatible.
google-colab 1.0.0 requires requests~=2.23.0, but you have requests 2.25.1 which is incompatible.
datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.
I did face similar problem with !pip install fiftyone but when I did repeat the syntax the problem gone.

tensorflow, tensorflow-quantum, grpcio dependency conflicts

I installed tensorflow-quantum and got the following error:
tensorflow-quantum 0.5.0 requires grpcio==1.30.0, but you have grpcio 1.32.0 which is incompatible.
So, I installed grpcio 1.30.0, but then got the following error:
tensorflow 2.4.1 requires grpcio~=1.32.0, but you have grpcio 1.30.0 which is incompatible.
It seems these dependency conflicts are cyclic. What should I do?

Tensorflow on Ubuntu 16.04 Not Installing

I'm trying to install the GPU version of Tensorflow using Virtualenv on Ubuntu 16.04 and Python 3.6 (Anaconda), but it keeps on outputting these errors
tensorflow-gpu 1.7.0 requires numpy>=1.13.3, which is not installed.
tensorflow-gpu 1.7.0 requires six>=1.10.0, which is not installed.
tensorboard 1.7.0 requires numpy>=1.12.0, which is not installed.
tensorboard 1.7.0 requires six>=1.10.0, which is not installed.
tensorboard 1.7.0 requires werkzeug>=0.11.10, which is not installed.
protobuf 3.5.2.post1 requires six>=1.9, which is not installed.
html5lib 0.9999999 requires six, which is not installed.
grpcio 1.10.0 requires six>=1.5.2, which is not installed.
bleach 1.5.0 requires six, which is not installed.
absl-py 0.1.13 requires six, which is not installed.
I've tried installing both numpy and six using sudo pip install numpy six both in the virtualenv and out of it, but the error is still present. Any ideas on how to fix this?
You are using the conda and virtualenv simultaneously which is usually a bad idea. If you installed Python from anaconda use their environment tool.
conda create -n tensorflow pip python=3.6
source activate tensorflow
pip install --ignore-installed --upgrade\
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.6.0-cp36-cp36m-linux_x86_64.whl
Additionally, have a look at how to install tensorflow with anaconda.