Skip to content

Import error not compatible with tensorflow v 2.0 #1987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alecda573 opened this issue Jul 11, 2020 · 14 comments
Closed

Import error not compatible with tensorflow v 2.0 #1987

alecda573 opened this issue Jul 11, 2020 · 14 comments
Labels

Comments

@alecda573
Copy link

System information

  • Windows 10
  • Tf v 2.0 downloaded with conda
  • Trying to use pip install tensorflow_addons
  • python 3.7
  • GPU support:

Trying to download tensorflow_addons with
pip install tensorflow_addons
which works but when I try to import tensorflow_addons

import tensorflow as tf
import tensorflow_addons as tfa

I get the following error:
UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.2.0 and strictly below 2.3.0 (nightly versions are not supported).
The versions of TensorFlow you are currently using is 2.0.0 and is not supported.
Some things might work, some things might not.
If you were to encounter a bug, do not file an issue.
If you want to make sure you're using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons's version.
You can find the compatibility matrix in TensorFlow Addon's readme:
https://github.com/tensorflow/addons

AttributeError: module 'tensorflow_core.keras.utils' has no attribute 'register_keras_serializable'

Any ideas why this is or how to install the correct version of tensorflow_addons to get this to work?

@bhack
Copy link
Contributor

bhack commented Jul 11, 2020

Ceck python and c++ compatibility matrix at https://github.com/tensorflow/addons#python-op-compatility

@alecda573
Copy link
Author

@bhack v 2.0 is compatible so I do not see the issue.

@bhack
Copy link
Contributor

bhack commented Jul 11, 2020

You wrote:

pip install tensoflow_addons

From the compatibility matrix that you want with the old Tensorflow 2.0.0 I see:
pip install tensorflow_addons == 0.6.0

@bhack
Copy link
Contributor

bhack commented Jul 11, 2020

pip install tensorflow_addons==0.6.0

@alecda573
Copy link
Author

ERROR: Could not find a version that satisfies the requirement tensorflow_addons==0.6.0 (from versions: 0.7.0, 0.7.1, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.9.1, 0.10.0)
ERROR: No matching distribution found for tensorflow_addons==0.6.0

@bhack
Copy link
Contributor

bhack commented Jul 11, 2020

Can you past the output of pip --version?

@alecda573
Copy link
Author

pip 20.0.2 from C:\Users\alecd\Anaconda3\envs\tensorflow\lib\site-packages\pip (python 3.7)

@bhack
Copy link
Contributor

bhack commented Jul 11, 2020

Ok it is good: pip install tensorflow-addons==0.6.0

@alecda573
Copy link
Author

Yep still getting the same error about no matching distribution:

ERROR: Could not find a version that satisfies the requirement tensorflow-addons==0.6.0 (from versions: 0.7.0, 0.7.1, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.9.1, 0.10.0)
ERROR: No matching distribution found for tensorflow-addons==0.6.0

@bhack
Copy link
Contributor

bhack commented Jul 11, 2020

The package is available as you can see in https://pypi.org/project/tensorflow-addons/0.6.0/#files.
Probably it is your conda setup cause we don't support conda currently as you can see from #201.

@alecda573
Copy link
Author

Ok thanks. I will set up no environment using pip and hopefully that will work. Thanks for your help!

@bhack
Copy link
Contributor

bhack commented Jul 11, 2020

Let us know if it works in the env pip so that we can close this.
You could also subscribe to the conda ticket but I don't expect too much updates soon on that thread.

@WindQAQ WindQAQ added the build label Jul 13, 2020
@seanpmorgan
Copy link
Member

It looks as though TFA 0.6 was not published for Windows which is why you're not finding a pip package.

I do want to clarify that users can pip install tensorflow-addons inside of a conda environment, however the tensorflow installed in that environment must have also been installed through pip.

Sorry there is nothing we can do to support Windows on v0.6. My advice would be to upgrade to at least TF2.1 where we have whl's available for TFA on Windows.

@bhack
Copy link
Contributor

bhack commented Jul 14, 2020

Good. I didn't know that we had no Win support in the old days 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants