Skip to content
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

tfc-2.9.1 import error #148

Closed
gitlabspy opened this issue Jul 13, 2022 · 6 comments
Closed

tfc-2.9.1 import error #148

gitlabspy opened this issue Jul 13, 2022 · 6 comments
Assignees

Comments

@gitlabspy
Copy link

TensorFlow version: 2.9.1-gpu
TFC version: 2.9.1 # installed with pip install tensorflow-compression

got error when importing tfc

----> 2 import tensorflow_compression as tfc

/usr/local/lib/python3.7/dist-packages/tensorflow_compression/__init__.py in <module>
     15 """Data compression in TensorFlow."""
     16 
---> 17 from tensorflow_compression.python import distributions
     18 from tensorflow_compression.python import entropy_models
     19 from tensorflow_compression.python import layers

/usr/local/lib/python3.7/dist-packages/tensorflow_compression/python/distributions/__init__.py in <module>
     17 from tensorflow_compression.python.distributions.deep_factorized import *
     18 from tensorflow_compression.python.distributions.helpers import *
---> 19 from tensorflow_compression.python.distributions.round_adapters import *
     20 from tensorflow_compression.python.distributions.uniform_noise import *

/usr/local/lib/python3.7/dist-packages/tensorflow_compression/python/distributions/round_adapters.py in <module>
     20 from tensorflow_compression.python.distributions import helpers
     21 from tensorflow_compression.python.distributions import uniform_noise
---> 22 from tensorflow_compression.python.ops import round_ops
     23 
     24 

/usr/local/lib/python3.7/dist-packages/tensorflow_compression/python/ops/__init__.py in <module>
     15 """TensorFlow operations and functions."""
     16 
---> 17 from tensorflow_compression.python.ops.gen_ops import *
     18 from tensorflow_compression.python.ops.math_ops import *
     19 from tensorflow_compression.python.ops.padding_ops import *

/usr/local/lib/python3.7/dist-packages/tensorflow_compression/python/ops/gen_ops.py in <module>
     19 
     20 ops = load_library.load_op_library(resource_loader.get_path_to_datafile(
---> 21     "../../cc/libtensorflow_compression.so"))
     22 globals().update({n: getattr(ops, n) for n in dir(ops)})
     23 

/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/load_library.py in load_op_library(library_filename)
     52     RuntimeError: when unable to load the library or get the python wrappers.
     53   """
---> 54   lib_handle = py_tf.TF_LoadLibrary(library_filename)
     55   try:
     56     wrappers = _pywrap_python_op_gen.GetPythonWrappers(

NotFoundError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/lib/python3.7/dist-packages/tensorflow_compression/python/ops/../../cc/libtensorflow_compression.so)
@gitlabspy
Copy link
Author

Case above is in linux system.
Also I found that mac m1 is not supported, any solution? (cannot install through pip install )

@jonarchist
Copy link
Collaborator

Hi, thanks for reporting. This looks like a problem with our wheel files. It might take a while to debug this. Can you tell us what linux distro and version you are using?

@jonarchist jonarchist self-assigned this Jul 15, 2022
@gitlabspy
Copy link
Author

Debian 10. I solved it by downgrading both tf and tfc to 2.8.0, which does not require GLIBC_2.29.

@jonarchist
Copy link
Collaborator

The 2.9.2 release should fix this problem. Would you mind trying this on your system and confirming? Thanks.

@gitlabspy
Copy link
Author

It works fine now!
M1 chip mac can not install through pip install tensorflow-compression , No matching distribution found for tensorflow-compression...

@jonarchist
Copy link
Collaborator

Great, thanks for confirming. Regarding M1, unfortunately we don't have binaries available for that platform yet. We will consider to add them once TensorFlow has binary packages for M1.

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

No branches or pull requests

2 participants