google-deepmind / concordia

A library for generative social simulation
Apache License 2.0
633 stars 148 forks source link

Issues installing with Python 3.11/3.12 #16

Closed jaredvann closed 9 months ago

jaredvann commented 9 months ago

I am trying to install Concordia with Python 3.11 and 3.12 on both macOS and Windows with:

pip install -e .

I get an error that the tensorflow-text package could not be found. Looking at the tensorflow-text GitHub repo and PyPI page it looks like it is only available for Python 3.9/3.10.

Thanks, Jared

jagapiou commented 9 months ago

It's working in our tests, which run 3.11 on OSX and Ubuntu and infer tensorflow-text==2.15.0.

An sdist that works for 3.10 should also be compatible with 3.11. Perhaps there's some other reason for the failure to find a wheel. pip -vvv install -e . might help debug.

jaredvann commented 9 months ago

I've ran the verbose pip command on OSX and it looks like the available wheel tags are all for x86_64.

I've found in the tensorflow-text repo readme that they now only provide wheels for 'Linux x86_64 and Intel-based Macs' (https://github.com/tensorflow/text#a-note-about-different-operating-system-packages). So this looks like a platform issue rather than a Python version issue.

I see I have two possible workarounds:

I'm happy for this issue to be closed. Thanks for taking a look.

  Skipping link: none of the wheel's tags (cp310-cp310-macosx_10_9_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/63/0f/d260a5cc7d86d25eb67bb919f957106b76af4a039f064526290d9cf5d93e/tensorflow_text-2.15.0-cp310-cp310-macosx_10_9_x86_64.whl (from https://pypi.org/simple/tensorflow-text/)
  Skipping link: none of the wheel's tags (cp310-cp310-manylinux2014_x86_64, cp310-cp310-manylinux_2_17_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/70/12/91be80b24a403593f9dacddabd6f7ea110373a1831f575ad2d34fe7d4f7e/tensorflow_text-2.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from https://pypi.org/simple/tensorflow-text/)
  Skipping link: none of the wheel's tags (cp311-cp311-macosx_10_9_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/8a/fe/a2f19d3d3ab834c3fa1007c970b0b86573beb929c86ca6c85cd13e86e4b2/tensorflow_text-2.15.0-cp311-cp311-macosx_10_9_x86_64.whl (from https://pypi.org/simple/tensorflow-text/)
  Skipping link: none of the wheel's tags (cp311-cp311-manylinux2014_x86_64, cp311-cp311-manylinux_2_17_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/20/a0/bdbf2a11141f1c93e572364d13c42537cfe811b747a0bbb58fdd904f3960/tensorflow_text-2.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from https://pypi.org/simple/tensorflow-text/)
  Skipping link: none of the wheel's tags (cp39-cp39-macosx_10_9_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/88/db/e2a10d9582704d57923c9948e42ab05aae90fb3f5a8305394ed6961f1668/tensorflow_text-2.15.0-cp39-cp39-macosx_10_9_x86_64.whl (from https://pypi.org/simple/tensorflow-text/)
  Skipping link: none of the wheel's tags (cp39-cp39-manylinux2014_x86_64, cp39-cp39-manylinux_2_17_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://files.pythonhosted.org/packages/fa/59/82c59ca4d26ce24b0e65a1869bbbfc8615df11c31ecf439be095206aa006/tensorflow_text-2.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (from https://pypi.org/simple/tensorflow-text/)
Skipping link: not a file: https://pypi.org/simple/tensorflow-text/
Given no hashes to check 0 links for project 'tensorflow-text': discarding no candidates
INFO: pip is looking at multiple versions of gdm-concordia to determine which version is compatible with other requirements. This could take a while.
Will try a different candidate, due to conflict:
    gdm-concordia 1.0.0 depends on tensorflow-text
ERROR: Ignored the following versions that require a different python version: 4.0.0 Requires-Python >=3.7,<3.11; 4.0.0a1 Requires-Python >=3.7,<3.11; 4.0.0a2 Requires-Python >=3.7,<3.11; 4.0.0a3 Requires-Python >=3.7,<3.11; 4.0.0a6 Requires-Python >=3.7,<3.11; 4.0.0b1 Requires-Python >=3.7,<3.11; 4.0.0b2 Requires-Python >=3.7,<3.11; 4.0.0b3 Requires-Python >=3.7,<3.11; 4.0.0b4 Requires-Python >=3.7,<3.11; 4.0.0b5 Requires-Python >=3.7,<3.11; 4.0.2 Requires-Python >=3.7,<3.11; 4.0.3 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement tensorflow-text (from gdm-concordia) (from versions: none)
ERROR: No matching distribution found for tensorflow-text
Exception information:
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 439, in resolve
    raise ResolutionImpossible(self.state.backtrack_causes)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('tensorflow-text'), parent=EditableCandidate('file:///Users/jared/Desktop/ai/concordia'))]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 104, in resolve
    raise error from e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for tensorflow-text
Remote version of pip: 23.3.2
Local version of pip:  23.3.2
Was pip installed by pip? True
Removed build tracker: '/private/var/folders/5y/vgj5l8614q7dshm8vjcs9gch0000gn/T/pip-build-tracker-44n8n1j9'