Install TensorFlow addons - tensorflow

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

Related

Python 3.8.3 incompatible with tensorflow

I recently installed python with the version 3.8.3 and upgraded pip to 20.1.1. According to enter link description here, conda install -c conda-forge tensorflow should work. However, I get this result
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- tensorflow -> python[version='3.5.*|3.6.*|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.7.*']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
since I use
(base) C:\Users\ivan>python --version
Python 3.8.3
(base) C:\Users\ivan>pip --version
pip 20.1.1 from C:\Users\ivan\anaconda3\lib\site-packages\pip (python 3.8)
I wonder if it is possible to solve this issue without downgrading. For users of anaconda 2020.07, python 3.8 is used by default. Downgrading it will break anaconda.
People have reported problems using tensorflow with python 3.8, it is best to use 3.7. You are incorrect about breaking Anaconda. Here is what to do.
In Anaconda home page click on environments. At the bottom left of the page click on create. A window will appear. Give the new environment a name (say python3.7). In the drop down menu select 3.7. Now a new environment is created using python 3.7. Now in the conda terminal type conda activate python3.7. Then use conda to install tensorflow. It will install version 2.1.1, the cuda toolkit version 10.1.243 and cudnn version 7.6.5. Note conda can only install tensorflow up to version 2.1.1. If you want tensorflow 2.2 install it with pip using pip install tensorflow ==2.2.0. after you have installed 2.1. The cuda toolkit and cudnn work with version 2.2. Now use pip or conda to install any other packages you need in your python3.7 environment and you should be good to go!

Unable to install Tensorflow 2.2.0 using pip

I am using ubuntu 20.04 with python 3.6.5 Anaconda. Previously, I have installed Tensorflow 2.0.0a0 and it was showing in both "pip list" and "conda list" but Now I want to install version 2.2.0 because I am unable to import "stellargraph" as it requires 2.1.x or higher version But when I uninstalled 2.0.0a0 completely and installing Tensorflow 2.2.0 previously, it was not showing in pip list or conda list and so, again when I am trying to install it on terminal using :
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.2.0-cp36-cp36m-manylinux2010_x86_64.whl
as mentioned here, I am getting this output on terminal.
But it is not installed as I can't see it in pip list and site-packages folder.
pip list
Can anyone please help me ?

Can't install Rasa on Ubuntu 18.04 + Python 3.7.5?

I have succeed to install Rasa NLU on my Win 10 with python 3.7 but couldn't do this on Ubuntu 18.04.
Please help.
Here is the error I get:
pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple
Could not find a version that satisfies the requirement
tensorflow~=1.15.0 (from rasa~=1.5.1->rasa-x) (from versions:
1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1) No matching distribution found for tensorflow~=1.15.0 (from rasa~=1.5.1->rasa-x)
Please advise what is the difference to my Win10 machine?
Please advise how can I install it.
I had followed these following steps and it's working fine for me for ubuntu 18.04 + Python3
Firstly create directory name of your choice and get inside of it
mkdir rasaprojects #directory name of your choice in place of rasaprojects
cd rasaprojects #get inside that directory
Now create virtual environment of python3
virtualenv rasaenv -p python3 #write your environment name instead of rasaenv
Now activate the environment
source rasaenv/bin/activate
Now you are good to go with rasa installation
pip3 install rasa
Updating your pip version should solve the issue. I believe TensorFlow and your current pip version don't go well together.
Do this:
Download pip installer python script from here.
Run it using python get-pip.py
Another thing is that TensorFlow was not supported by python3.7 untill recently. So if the first solution doesn't work you can try downgrading python to python3.6
Upgrade pip before instaling rasa.
pip3 install --upgrade pip

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

How to download previous version of tensorflow?

For some reason, I want to use some previous version of tensorflow('tensorflow-**-.whl', not source code on github) and where can I download the previous version and how can I know the corresponding cuda version that is compatible.
It works for me, since I have 1.6
pip install tensorflow==1.5
Find available versions (some example results shown):
$ curl -s https://storage.googleapis.com/tensorflow |xmllint --format - |grep whl
<Key>linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl</Key>
<Key>linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl</Key>
<Key>linux/gpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl</Key>
<Key>linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl</Key>
You can, of course, filter the results further by piping through additional instances of grep.
Pick the version you want and install for Python with pip...
$ TFVERSION=linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
$ pip install https://storage.googleapis.com/tensorflow/$(TFVERSION)
Note: cp27 in the list above indicates compatibility with Python version 2.7.
The above answer does not work any more.
You can install like this:
curl -s https://storage.googleapis.com/tensorflow |xmllint --format - |grep whl
<Key>linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl</Key>
<Key>linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl</Key>
<Key>linux/gpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl</Key>
<Key>linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl</Key>
Then pick the model you want.
Then you can run this kind of command :
# Mac OS X, CPU only, Python 2.7:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0-py2-none-any.whl
Then install Tensorflow:
# Python 2
$ sudo pip install --upgrade $TF_BINARY_URL
# Python 3
$ sudo pip3 install --upgrade $TF_BINARY_URL
Source: https://www.tensorflow.org/versions/r0.11/get_started/os_setup#download-and-setup
You can do as suggested beforehand and search for available version in tesorflow site but you can't access versions older than available there.
So if you want an earlier version:
go to https://github.com/tensorflow/tensorflow
search for the version you want under branches - for instance r0.11
Then go to the download and setup section. Again, for r0.11: https://github.com/tensorflow/tensorflow/blob/r0.11/tensorflow/g3doc/get_started/os_setup.md and install as described there.
To download an older version of TensorFlow make sure you are using an older version of python as well. Otherwise, you will run into an issue like no version satisfying requirement found.
Create a virtual environment for this and install python==3..5
Use pip install tensorflow==1.4 or so.
Goto https://www.tensorflow.org/versions/
Click on the version you want, for example: https://www.tensorflow.org/versions/r1.1/
Click on install, for example: https://www.tensorflow.org/versions/r1.1/install/
Then follow your preferred way to install
in order to find out available previous versions all you need to do is either use :
pip search tensorflow-gpu or pip search tensorflow
conda search tensorflow-gpu or conda search tensorflow
and to install them even:
pip install tensorflow-gpu==1.15.0 or pip install tensorflow==1.15.0
conda install tensorflow-gpu==1.15.0 or conda install tensorflow==1.15.0
my experience conda search is much much cleaner and easier to find packages.
You can always download the previous version of tensorflow version
from here
Here on the top left you can change the version