google-deepmind / concordia

A library for generative social simulation
Apache License 2.0
497 stars 96 forks source link

three_key_questions.ipynb: ERROR: Package 'gdm-concordia' requires a different Python: 3.10.12 not in '>=3.11' #50

Closed cool-RR closed 4 months ago

cool-RR commented 4 months ago

I'm trying to run three_key_questions.ipynb, which I ran successfully a few months ago. I'm using this URL: https://colab.research.google.com/github/google-deepmind/concordia/blob/main/examples/three_key_questions.ipynb#scrollTo=tkCJgbFFvaAB

On the first cell which does a pip install git+https://github.com/google-deepmind/concordia.git I'm getting this error:

Collecting git+https://github.com/google-deepmind/concordia.git
  Cloning https://github.com/google-deepmind/concordia.git to /tmp/pip-req-build-k2ttpc91
  Running command git clone --filter=blob:none --quiet https://github.com/google-deepmind/concordia.git /tmp/pip-req-build-k2ttpc91
  Resolved https://github.com/google-deepmind/concordia.git to commit c578f1d2fc453e3a709d7114439f450b0b3b6d1b
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: absl-py in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (1.4.0)
Requirement already satisfied: google-cloud-aiplatform in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (1.48.0)
Requirement already satisfied: ipython in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (7.34.0)
Collecting langchain (from gdm-concordia==1.2.0)
  Downloading langchain-0.1.16-py3-none-any.whl (817 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 817.7/817.7 kB 9.4 MB/s eta 0:00:00
Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (3.7.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (1.25.2)
Collecting openai>=1.3.0 (from gdm-concordia==1.2.0)
  Downloading openai-1.23.2-py3-none-any.whl (311 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 311.2/311.2 kB 12.4 MB/s eta 0:00:00
Requirement already satisfied: pandas<=2.0.3 in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (2.0.3)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (2.8.2)
Collecting reactivex (from gdm-concordia==1.2.0)
  Downloading reactivex-4.0.4-py3-none-any.whl (217 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 217.8/217.8 kB 10.4 MB/s eta 0:00:00
Collecting retry (from gdm-concordia==1.2.0)
  Downloading retry-0.9.2-py2.py3-none-any.whl (8.0 kB)
Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (1.11.4)
Requirement already satisfied: termcolor in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (2.4.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from gdm-concordia==1.2.0) (4.11.0)
INFO: pip is looking at multiple versions of gdm-concordia to determine which version is compatible with other requirements. This could take a while.
ERROR: Package 'gdm-concordia' requires a different Python: 3.10.12 not in '>=3.11'
cool-RR commented 4 months ago

I tried running locally in Jupyter lab, where I can control the Python version, but I see that you use google.colab.widgets.

jzleibo commented 4 months ago

I just replicated this, and encountered the same issue when trying to use vertex a while ago. At that point I remember finding a doc somewhere that said they date they are planning to upgrade the python version behind that version of colab to python 11, and I remember it being a date toward the end of April. I suspect the same cloud infrastructure is behind colab when you run it this way too. So, most likely, this problem will go away sometime in the next week or two when they update the python version.

When you run in jupyter with python 11, that should work, right? The widgets are not critical, you can probably remove them easily.

We will be more careful with increasing the python version requirements in the future to prevent this from happening again..

cool-RR commented 4 months ago

Thank you. Indeed the notebook worked in Jupyter and the widgets were not essential.

giammy677dev commented 4 months ago

Facing the same error in Colab. Is there a way to execute that example in Colab?

jzleibo commented 4 months ago

When you google how to update the colab python version you find that there are many explanations of how to do it. Do none of them work?