tensorflow/quantum

Installation issues

zohimchandani opened this issue · 2 comments

Trying to execute this notebook on VS Code with python 3.9.6 but the following error appears:

!pip install tensorflow==2.4.1 

ERROR: Could not find a version that satisfies the requirement tensorflow==2.4.1 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.5.2, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.8.0rc0)
ERROR: No matching distribution found for tensorflow==2.4.1
WARNING: You are using pip version 21.1.3; however, version 21.3.1 is available.
You should consider upgrading via the '/Users/zohim/Desktop/Rigetti /Code/Quantum Kernel Methods/qkm/bin/python3.9 -m pip install --upgrade pip' command.


whereas this executes perfectly on Google Colab. Wondering what the issue might be?

Moreover, having trouble installing TFQ too:

(qkm) zohim@Zohims-MacBook-Pro Quantum Kernel Methods % pip install tensorflow-quantum
ERROR: Could not find a version that satisfies the requirement tensorflow-quantum (from versions: none)
ERROR: No matching distribution found for tensorflow-quantum

Any help is much appreciated, thanks.

Only tensorflow 2.5 and up supports python 3.9 (see https://www.tensorflow.org/install/pip). Hence you won't be able to install tensorflow 2.4 on a python 3.9 system.

Like @lockwo mentioned, right now there is no release version of TFQ that can work with TF >= 2.5.0. If you would like you can do pip install tensorflow==2.7.0 and then pip install -U tfq-nightly which should work on python39. We are planning to cut a new release version soon based off of our nightly releases that would fix this issue.