Protobuf issue during TensorFlow installation - tensorflow

I am trying to install the TensorFlow version 0.12 which requires Protobuf 3.1.0. I also use Anaconda in which repository there is only Protobuf 3.0.0. How can I upgrade Protobuf and install TensorFlow?
The official website prints out the requirement of 3.1.0 but at the same time it provides the wrong package 3.0.0.
https://www.tensorflow.org/versions/r0.12/get_started/os_setup.html#protobuf-library-related-issues

I just changed 3.0.0 to 3.1.0 in the URL, so
https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.1.0-cp27-none-linux_x86_64.whl
instead of
https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.0.0-cp27-none-linux_x86_64.whl
Seems to work just fine!

pip uninstall protobuf
pip install -U protobuf
worked for me.

If you are using poetry you can update protobuf with the right versions poetry add "probuf#>=3.9.2,<3.20" and then poetry add tensorflow.
The same with pip, upgrade protobuf to the specified version and then run pip install tensorflow.

One solution is to use pip install protobuf. One can also download the whl package from https://pypi.python.org/pypi/protobuf/3.1.0 and run
pip install protobuf-3.1.0-py2.py3-none-any.whl

Related

tensorflow-data-validation cannot be pip installed

Since I'm moving away from pandas DataFrames to TensorFlow datasets, I'd like to use tensorflow-data-validation instead of the more traditional pandas-profiling when it comes to data exploration and validation.
However, pip install tensorflow-data-validation gives the following error:
ERROR: Could not find a version that satisfies the requirement tensorflow-data-validation (from versions: none)
ERROR: No matching distribution found for tensorflow-data-validation
What could be the problem? This old GitHub issue explains how this could be due to the Python version, but Apache Beam (on which tensorflow-data-validation presumably relies) is now fully compatible with Python 3, so it must be something else.
My environment is as follows:
Python 3.9.2
TensorFlow 2.6.0
Debian GNU/Linux 11 (bullseye)
pip 21.3
I got the same error when using Python 3.9. After downgrading to Python 3.8, pip install tensorflow-data-validation ran successfully.
Regarding your comment about Apache Beam, it looks like the Python SDK currently supports Python 3.8 (and earlier) but not yet Python 3.9.
My environment:
Python 3.8.10
TensorFlow 2.8.0
macOS Monterey (12.0.1)
pip 21.1.1
Try this
pip install --upgrade --force-reinstall tensorflow-data-validation[all]
It might be a version compatibility issue with tensorflow==2.6.0.
Try
pip install tensorflow-data-validation==1.3.0
I was able to install the tensorflow_data_validation library successfully, via the below command in my Google Colab file.
!pip install -U tensorflow \
tensorflow-data-validation \
apache-beam[gcp]

Install TensorFlow addons

I have a venv with the following details:
python 3.6
TensorFlow 2.0.0
I tried to install tensorflow-addons using the following:
pip install -q --no-deps tensorflow-addons~=0.6
But then I keep receiving the following error:
Could not find a version that satisfies the requirement tensorflow-addons~=0.6 (from versions: )
No matching distribution found for tensorflow-addons~=0.6
You are using pip version 18.0, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I also tried other versions of tensorflow-addons, e. g., 0.4.0, 0.5.0, ..., but it did not work out.
I came across this problem two times and each time I had to solve the problem with a different solution.
1. Solution:
Upgrade pip/pip3 by using the following command.
python3 -m pip install --upgrade pip
Select appropriate version of the tensorflow-addons using the
following link
https://github.com/tensorflow/addons#python-op-compatibility-matrix
Install using the following command
pip install tensorflow-addons==version
2. Solution:
go to https://pypi.org/project/tensorflow-addons/#history
click on appropriate version
click on "Download files" on menu to the left
click on a .whl file that matches your system
requirements/specifications
go to the directory where you download the .whl file and run the
following
pip install tensorflow_addons-name.whl
The problem appears to have been related to installing on Windows platforms in the earlier versions of tensorflow-addons. As of time of updating this comment this issue should disappear completely.
In fact the developers state it has been solved, as it is shown here:
FYI stable release for windows is out. pip install tensorflow-addons
https://github.com/tensorflow/addons/issues/173#issuecomment-573106184
At your command prompt, simply specify the version you want to install.
For me, my python version is 3.7.4 and Tensorflow version is 2.2.0
Therefore, the tensorflow-addons version that matches my python and tensorflow version is 0.10.0
pip install tensorflow-addons==0.10.0

TensorFlow installation problem in Python 3.4-64 bit-Win10

I'm trying to install TensorFlow. I followed the first and second phase of https://www.tensorflow.org/install/pip correctly. But I have a problem with the phase " 3. Install the TensorFlow pip package". While virtual environment(venv) is active, i'm trying to do pip install --upgrade tensorflow-gpu
but i have an error which is Could not find a version that satisfies the requirement tensorflow (from versions: )No matching distribution found for tensorflow
I'm trying to install using .whl also, but I can't find exact file for Python 3.4 64bit Win10. But in the website of tensorflow, they noted that "Requires Python 3.4, 3.5, or 3.6".
So why I got this error and how can I solve it? What am I doing wrong?
If you have an idea or experience on the subject, I would be glad if you share with me.
Thanks a lot for your help in advance.
Try to install with pip3
pip3 install --upgrade tensorflow-gpu

how to resolve bleach==1.5.0 html5lib=0.9999999 on windows10

Hello I want to pip install pymc3 in tensorflow version 3.5 on windows
but it is not worked.
pip install git+https://github.com/pymc-devs/pymc3
tensorflow-tensorboard 1.5.0 has requirement bleach==1.5.0, but you'll have bleach 2.1.2 which is incompatible.
tensorflow-tensorboard 1.5.0 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible
please help me :(
It is clear from the error that there is a mismatch of the package versions. You have several options from here.
If you haven't installed tensorboard already, install tensorboard and see if the error is resolved: pip install tensorboard
If you have installed tensorboard already, uninstall tensorboard with: pip uninstall tensorboard and specify the version of tensorboard you want to install: pip install tensorboard=1.5.1. Refer to here for more details
As suggested by your screenshot, it is evident that the package tensorflow-tensorboard is not compatible with the latest version of bleach package. These are interdependent packages.
An easy solution, as suggested by your command prompt is to use an older version of bleach package.
I tested the following command, which worked for me for installing bleach 1.5.0.pip install -I bleach==1.5.0
I am using pip version = 10.0.1.To check your current pip version, run the following command: pip --version
After you're done with the installation, you can check the version of all your installed packages usingpip freeze
For more information about this compatibility issue, refer this TensorFlow Article on GitHub.
You can do the same for html5lib as well, by following the exact steps above and changing the parameter.
Hope it works!
Tensorflow-tensorboard is not compatible with the latest version of bleach package.
You have to install the following packages by
$ pip install numpy==1.13.0 --user
You install the other with same
Check the version of pip:
$ pip --version
Update pip: $pip install --upgrade pip

Downgrade to Bazel 0.4.2 for Tensorflow r1.0

I need to checkout to Tensorflow r1.0 and as suggested the Bazel version should be 0.4.2
I have already installed Bazel and after upgrade bazel version is 0.7.0
Do you know the steps so I can downgrade to Bazel 0.4.2?
I have tried with apt-get install bazel=0.4.2 but this does not work,
and I have also tried to uninstall by executing the command rm -fr ~/.bazel ~/.bazelrc and deleting relevant data in ~/.cache/bazel/ folder, but this did not also work.
Any suggestions ?
Thank you in advance
Considering you are using linux. Download bazel 0.4.2 executable from Here. Remove old version and install