ERROR: No matching distribution found for tensorflow==2.7.0

Hi,

I’m getting errors while trying TFQ in Colab.

Looking in indexes: Simple index, https://us-python.pkg.dev/colab-wheels/public/simple/
ERROR: Could not find a version that satisfies the requirement tensorflow==2.7.0 (from versions: 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0, 2.11.1, 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.13.0rc0, 2.13.0rc1)
ERROR: No matching distribution found for tensorflow==2.7.0

Any help would be useful!

@Ravi_Jha,

Welcome to the Tensorflow Forum!

You are seeing this error because Colab has python version 3.10. Tensorflow quantum 0.7.2 is compatible with Python 3.7, 3.8, 3.9 and does not support Python 3.10.

Thank you!

1 Like

Hi @chunduriv,

Thanks for replying.

Is that mean, I can’t work with Tensorflow quantum (any version) in Colab anymore? I’m new here, so have not yet figured much.

Any suggestion in that regard, please?

Thanks in advance.

@Ravi_Jha,

If you are interested to use Colab then downgrade python version to 3.8.

Otherwise create a virtual environment with list of requirements using Python 3.8

cirq-core==0.13.1
cirq-google==0.13.1
sympy==1.8
numpy==1.19.5  
nbformat==4.4.0
pylint==2.4.4
yapf==0.28.0
tensorflow==2.7.0
googleapis-common-protos==1.52.0
google-api-core==1.21.0
google-auth==1.18.0
google-api-python-client==1.8.0
grpcio==1.34.1
protobuf==3.17.3

Thank you!

Many thanks @chunduriv for your previous help.
I’m getting new set of errors when I try to repeat the same version of TFQ as:

"Traceback (most recent call last):
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/ops/load_module.py”, line 42, in load_module
return load_library.load_op_library(path)
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py”, line 58, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/ops/_tfq_simulate_ops.so: undefined symbol: _ZNK10tensorflow8OpKernel11TraceStringERKNS_15OpKernelContextEb

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/init.py”, line 18, in
from tensorflow_quantum.core import (append_circuit, get_expectation_op,
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/init.py”, line 17, in
from tensorflow_quantum.core.ops import (get_expectation_op,
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/ops/init.py”, line 18, in
from tensorflow_quantum.core.ops.circuit_execution_ops import (
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/ops/circuit_execution_ops.py”, line 20, in
from tensorflow_quantum.core.ops import (cirq_ops, tfq_simulate_ops,
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/ops/tfq_simulate_ops.py”, line 19, in
SIM_OP_MODULE = load_module(“_tfq_simulate_ops.so”)
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/ops/load_module.py”, line 46, in load_module
return load_library.load_op_library(path)
File “/mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py”, line 58, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /mnt/scratch2/users/rkjha/Anaconda3/envs/tfq38/lib/python3.8/site-packages/tensorflow_quantum/core/ops/_tfq_simulate_ops.so: undefined symbol: _ZNK10tensorflow8OpKernel11TraceStringERKNS_15OpKernelContextEb
"

Can you help to decode the error, please. I am using Mobaxterm and Conda environment to access bigger computing resources.

Many thanks in advance!
Ravi

@Ravi_Jha,

It seems, there is a mismatch between the version of TFQ and other related libraries or missing some dependencies.

I request you please create a issue in TFQ Github Repo for assistance.

Thank you!