facebookresearch/recipes

Failure of installing from source code using Python 3.7

chongxiaoc opened this issue · 2 comments

I'm using Python 3.7.13, I checked out master branch and tried to install from source, but it failed with the below error.

[root@~/recipes #]pip3 install -e .
Obtaining file:///root/recipes
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpawqnwy25
       cwd: /root/recipes
  Complete output (17 lines):
  Traceback (most recent call last):
    File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-j_o4gy55/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 178, in get_requires_for_build_wheel
      config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-j_o4gy55/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-j_o4gy55/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 174, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 27
      if version := os.getenv("BUILD_VERSION"):
                  ^
  SyntaxError: invalid syntax
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.7 /usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpawqnwy25 Check the logs for full command output. 

@hudeven -> let's fix this? I thin we should support 3.7 (it's what pytorch latest does)

@chongxiaoc @colin2328 thanks for reporting the issue! It should support Python 3.7 now. Please reopen this issue if it doesn't work on your sides.