abseil / abseil-py

Abseil Common Libraries (Python)
Apache License 2.0
2.28k stars 247 forks source link

Error during installation of version #246

Closed fera0013 closed 1 year ago

fera0013 commented 1 year ago

Tensorflow Extended requires absl-py<0.9,>=0.7.

On my windows machine, however,

pip install absl-py==0.8.1

generates the error

Collecting absl-py==0.8.1
  Using cached absl-py-0.8.1.tar.gz (103 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "c:\Users\z0017fjy\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "c:\Users\z0017fjy\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "c:\Users\z0017fjy\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\z0017fjy\AppData\Local\Temp\pip-build-env-d9eghk5s\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\z0017fjy\AppData\Local\Temp\pip-build-env-d9eghk5s\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "C:\Users\z0017fjy\AppData\Local\Temp\pip-build-env-d9eghk5s\overlay\Lib\site-packages\setuptools\build_meta.py", line 488, in run_setup
          self).run_setup(setup_script=setup_script)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\z0017fjy\AppData\Local\Temp\pip-build-env-d9eghk5s\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 34, in <module>
      RuntimeError: Python version 2.7 or 3.4+ is required.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

My python version is

python --version
Python 3.11.2

Which should meet the version requirement 3.4+.

What could be the issue?

yilei commented 1 year ago

This absl-py installation issue in Python 3.10+ has been fixed in #161 and released in absl-py 0.12.0.

Please file an issue in tfx to update the absl-py requirement if they support Python 3.10+.