quantum
quantum copied to clipboard
That sounds like the issues I linked. Colabs default Python version isn’t supported.
That sounds like the issues I linked. Colabs default Python version isn’t supported.
Originally posted by @lockwo in https://github.com/tensorflow/quantum/issues/768#issuecomment-1535598819
It's true, the default version of python isn't supported. I came to an understanding that tensorflow_quantum works is compatible with python 3.8. So I installed python3.8 in google colab with help of an issue in tensorflow repo.
But then while importing tensorflow_quantum it shows ModuleNotFoundError: No module named 'tensorflow_quantum'
For reference I have mentioned link to my colab notebook
Yea, I've had a bunch of issues with colab now that they changed the version. In the linked notebook, I keep getting an error in that notebook that the runtime crashed, but that's not surprising, I usually encounter issues when hacking with colabs default versions. I have entirely stopped using colab + TFQ since the change in default python version.
Since TFQ has no problem installing on a fresh local environment with 3.8.10 it doesn't seem like there's any errors in TFQ, I would assume something else is at play in colab, which I don't know enough about to comment on.
I actually had no problems with this colab: https://github.com/tensorflow/tensorflow/issues/60428#issuecomment-1527270841 from the TF issue you linked. Seemed to do the trick.
That's really odd. I really can't think of any reason why am I getting that error, we both are running the same notebook.
That notebook does not work for me either. When running, !sudo update-alternatives --config python3
, I get, update-alternatives: error: no alternatives for python3.
Yes, changing python versions in colab can be unreliable at best. I do not attempt it usually. If you are having version control problems with colab though, I would recommend contacting their support for more help.
Duplicate of #798