fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

pip install fairseq fails on windows 11

Open psvrao opened this issue 2 years ago • 5 comments

❓ Questions and Help

Before asking:

  1. search the issues.
  2. search the docs.

What is your question?

Installation fails with "building 'fairseq.libbleu' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"

fairseq-error.docx

But Visual C++ is already installed, as can be seen in programs image below!

image

Code

pip install fairseq

What have you tried?

What's your environment?

  • fairseq Version (e.g., 1.0 or main): 0.12.2

  • PyTorch Version (e.g., 1.0): Not installed

  • OS (e.g., Linux): Windows 11

  • How you installed fairseq (pip, source): pip install fairseq

  • Build command you used (if compiling from source):

  • Python version: 3.8.0

  • CUDA/cuDNN version: 11.3.1/8.2.1

  • GPU models and configuration: NVIDIA GeForce GTX 1650 Ti, Driver version: 31.0.15.2698

  • Any other relevant information:

psvrao avatar Nov 24 '22 17:11 psvrao

Similar issue, but I think it could be related. Installation works fine for me on my primary windows machine, but when I tried installing on a different machine it threw the same error. I replicated Python libraries (version-locked) & Visual C++ distributables. Eventually, with enough distributables that error went away, but then it caused a new one...

When building 'fairseq.libbase' extension, many C++ warnings appear before finally throwing an error that exit code 1120: the Microsoft Visual Studio's 2022 VC Tool's link.exe failed due to 2 unresolved externals.

Been debugging this for a week, thought I was the only one!

RobertSmithers avatar Nov 30 '22 02:11 RobertSmithers

Trying to install on Windows 10 and also getting linker errors: balanced_assignment.obj : error LNK2001: unresolved external symbol _imp___tls_offset?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA balanced_assignment.obj : error LNK2001: unresolved external symbol _imp___tls_index?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA

Possibly related? https://stackoverflow.com/questions/74366357/updating-to-visual-studio-17-4-0-yields-linker-errors-related-to-tls

ipostr08 avatar Dec 08 '22 22:12 ipostr08

Apparently fairseq does not support windows and they do not have plans to support windows either. only possible solution is using Windows system for Linux (wsl) 2 If anyone else has a solution, do share!

Mohsyn avatar Oct 16 '23 04:10 Mohsyn

Similar issue. It seems that their C++ code is not portable to Windows.

kevin-guimard-ext avatar Oct 18 '23 14:10 kevin-guimard-ext

Painful process to install fairseq in Windows 11. None of the Header file is available. Every time, I run, I am getting one error of Header file missing or variable not declared. Installation process is going for a solid 8 hours now. No where it seems there is a full independent installation process is available.

mnsmani avatar Nov 29 '23 06:11 mnsmani