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

That sounds like the issues I linked. Colabs default Python version isn’t supported. #782

Open
anikde opened this issue Jun 16, 2023 · 7 comments

Comments

@anikde
Copy link

anikde commented Jun 16, 2023

          That sounds like the issues I linked. Colabs default Python version isn’t supported.

Originally posted by @lockwo in #768 (comment)

@anikde
Copy link
Author

anikde commented Jun 16, 2023

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

@lockwo
Copy link
Contributor

lockwo commented Jun 16, 2023

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.

@lockwo
Copy link
Contributor

lockwo commented Jun 16, 2023

I actually had no problems with this colab: tensorflow/tensorflow#60428 (comment) from the TF issue you linked. Seemed to do the trick.
image

@anikde
Copy link
Author

anikde commented Jun 16, 2023

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.
Screenshot from 2023-06-16 11-35-24

@kiannaamaya
Copy link

That notebook does not work for me either. When running, !sudo update-alternatives --config python3, I get, update-alternatives: error: no alternatives for python3.
Screenshot 2023-09-20 at 2 48 21 PM

@lockwo
Copy link
Contributor

lockwo commented Sep 20, 2023

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.

@knaughttyanyon
Copy link

Duplicate of #798

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

4 participants