Fairseq requirement fails to install
Collecting fairseq (from -r requirements.txt (line 7))
Using cached fairseq-0.12.1.tar.gz (9.6 MB)
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
╰─> [19 lines of output]
Traceback (most recent call last):
File "C:\Users\user\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\user\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\user\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\user\AppData\Local\Temp\pip-build-env-ma0u23mo\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ma0u23mo\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "C:\Users\user\AppData\Local\Temp\pip-build-env-ma0u23mo\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 27, in <module>
File "<string>", line 18, in write_version_py
FileNotFoundError: [Errno 2] No such file or directory: 'fairseq\\version.txt'
[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.
Any help?
Ended up using https://github.com/VarunGumma/fairseq, seems to work?
It doesn't work at all.
Ended up using https://github.com/VarunGumma/fairseq, seems to work?
按照你的方法运行成功了。 执行命令:poetry run pip install git+https://github.com/pytorch/fairseq
Nope not working huminghui. Windows doens't compete with python. Python is for selfish programmers.
poetry run pip install git+https://github.com/pytorch/fairseq
Here are some possible solutions:
1.Try upgrading pip and setuptools to the latest versions: pip install --upgrade pip setuptools 2.Try manually downloading the fairseq source code and check if the fairseq\version.txt file exists. If it doesn't exist, you can try manually creating an empty version.txt file. 3.If you are using Windows, ensure that backslashes \ are used in the file paths instead of forward slashes /. 4.Check if you have sufficient permissions to access and create files. Try running the command prompt or terminal with administrative privileges. 5.If the above steps do not resolve the issue, you can try installing fairseq manually from the GitHub repository: pip install git+https://github.com/pytorch/fairseq.git
Just downgrade pip version:
python -m pip install pip==24.0
pip install fairseq
https://github.com/facebookresearch/fairseq/issues/5518