google-deepmind / alphageometry

Apache License 2.0
4.1k stars 460 forks source link

Errors when running run.sh #96

Open stephen-flood opened 6 months ago

stephen-flood commented 6 months ago

I am installing AlphaGeometry in Debian 12.5, and I'm running into a few issues with the installation script. I get the same first two errors if I use the built in version of python3, and if I use pyenv to install version 3.10.9.

We are hoping to use AlphaGeometry in one of our classes on mathematics and AI, so I am trying to find a very simple way to explain the installation for math majors, who may lack direct experience with or access to a Linux distribution. I am currently working with the Windows Subsystem for Linux version of Debian, but suggestions for alternative or preferred operating systems are also welcome.

Here are the errors I have run into, along with the workarounds I have tried.

  1. There are two packages in requirements.txt that are giving errors. (Full error messages are included at the end of this issue) a. tensorflow-text does not appear to have an available version 2.13.0. Changing the version to 2.13.0rc0 seems to work, but requires adding a new hash. b. it does not seem to recognize the fact that etils does indeed have a version in the line etils[array-types,enp,epath,epy,etqdm,etree]==1.5.1 either deleting the part in brackets or deleting the hashes and using without --require-hash seems to help

  2. in numericals.py, I get the error ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running Moving matplotlib.use('TKAgg') directly after import matplotlib seems to help

  3. I am also sometimes running into a third issue, after making the above changes to fix my first two issues.
    When attempting to install alphageometry using the debian Python 3.11.2, I get the error tensorflow.python.framework.errors_impl.NotFoundError: ag_ckpt_vocab/geometry.757.model; No such file or directory during the execution of alphageometry.py. The folder ag_ckpt_vocab is empty, but I don't know if this is a result of the above changes I made, the use of python 3.11.2 instead of 3.10.9, or if this file is supposed to come from the gdown command (it's giving a permission error, so I downloaded the checkpoint file using a browser instead). On the other hand, the my attempt using Python 3.10.9 using the above changes but also using gdown did not have the same missing file error.

Any suggestions or edits to resolve these errors would be greatly appreciated. Thanks for assistance.


Here are the full errors from requirements.txt

ERROR: Could not find a version that satisfies the requirement tensorflow-text==2.13.0 (from versions: 2.12.0rc0, 2.12.0, 2.12.1, 2.13.0rc0, 2.14.0rc0, 2.14.0, 2.15.0rc0, 2.15.0, 2.16.0rc0, 2.16.1) ERROR: No matching distribution found for tensorflow-text==2.13.0

ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not: etils[epath] from https://files.pythonhosted.org/packages/d0/3c/784b5f94bcad62a4167f2347fe1095b627433c22a54aecc4504237494b81/etils-1.8.0-py3-none-any.whl (from array-record==0.4.1->-r requirements.txt (line 28))

szhang99 commented 6 months ago

You can install all packages from requirements.in, that works

shenglih commented 5 months ago

i had the exact same three errors with python 3.10. for 2, i changed to matplotlib.use('Agg'). 1 was resolved by using a conda env with python 3.10. hitting 3 now...

tj800x commented 3 months ago

Breadcrumb for the next guy for #3: "tensorflow.python.framework.errors_impl.NotFoundError: ag_ckpt_vocab/geometry.757.model; No such file or directory" See: https://huggingface.co/abrahamabelboodala/ALPHAGEOMETRY_ag_ckpt_vocab