fairseq: Cannot install fairseq==0.10.2 with python 3.9

I don’t seem to be able to install fairseq==0.10.2 with python 3.9 on macOS 11.3

$ pip install fairseq==0.10.2
Collecting fairseq==0.10.2
  Using cached fairseq-0.10.2.tar.gz (938 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/louismartin/miniconda3/envs/dev3.9/bin/python /Users/louismartin/miniconda3/envs/dev3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/tmpok_9kdi5
       cwd: /private/var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/pip-install-c4qbk_3i/fairseq_751efca8a5d547ada5c29fe71ec11ded
  Complete output (31 lines):
  Traceback (most recent call last):
    File "setup.py", line 214, in <module>
      do_setup(package_data)
    File "setup.py", line 136, in do_setup
      setup(
    File "/private/var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/pip-build-env-gi7j5w4c/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
      _install_setup_requires(attrs)
    File "/private/var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/pip-build-env-gi7j5w4c/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "/private/var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/pip-build-env-gi7j5w4c/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 60, in fetch_build_eggs
      raise SetupRequirementsError(specifier_list)
  setuptools.build_meta.SetupRequirementsError: ['cython', 'numpy', 'setuptools>=18.0']

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/Users/louismartin/miniconda3/envs/dev3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/Users/louismartin/miniconda3/envs/dev3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/louismartin/miniconda3/envs/dev3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/private/var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/pip-build-env-gi7j5w4c/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/private/var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/pip-build-env-gi7j5w4c/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/pip-build-env-gi7j5w4c/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 217, in <module>
      os.unlink(fairseq_examples)
  PermissionError: [Errno 1] Operation not permitted: 'fairseq/examples'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/02/59/1f466d82d64482e2809a167e0067979c23057b3752e668537d5ff24453c9/fairseq-0.10.2.tar.gz#sha256=45b90d8ccc3f5a4623a523fe2d0465f54413d03fd1ec9a9d7af0461148ca1a68 (from https://pypi.org/simple/fairseq/). Command errored out with exit status 1: /Users/louismartin/miniconda3/envs/dev3.9/bin/python /Users/louismartin/miniconda3/envs/dev3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/_4/yxn93yzn14g0_0k2rmctcc1x8lvpn4/T/tmpok_9kdi5 Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement fairseq==0.10.2
ERROR: No matching distribution found for fairseq==0.10.2

Seems to be due to this line

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 8
  • Comments: 23 (3 by maintainers)

Commits related to this issue

Most upvoted comments

still getting this buggo with python 3.9.9 (pip 22.1) on Void Linux for fairseq versions 0.10.1 and 0.10.2, but was able to run pip install fairseq==0.10.0

pip 21.3.1 did not work for me the only thing it did differently was it persevered when installing 0.10.2 and 0.10.1 failed and ended up successfully installing 0.10.0.