facebookresearch / recipes

Recipes are a standard, well supported set of blueprints for machine learning engineers to rapidly train models using the latest research techniques without significant engineering overhead.Specifically, recipes aims to provide- Consistent access to pre-trained SOTA models ready for production- Reference implementations for SOTA research reproducibility, and infrastructure to guarantee correctness, efficiency, and interoperability.
BSD 3-Clause "New" or "Revised" License
284 stars 35 forks source link

Failure of installing from source code using Python 3.7 #21

Closed chongxiaoc closed 2 years ago

chongxiaoc commented 2 years ago

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. 
colin2328 commented 2 years ago

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

hudeven commented 2 years ago

@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.