facebookresearch/fairseq2

Cannot install fairseq2 on WSL (versions have conflicting dependencies)

dmehta-huro opened this issue · 1 comments

I am on Windows 11 and had tried to clone and run the seamless library which also includes fairseq2 as a requirement. I then realized that fairseq2 does not support windows.

I set up WSL2 on my system and installed Ubuntu. Here are the details:

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

I then installed miniconda and jupyter. Next, I followed the instructions for downloading fairseq2 on linux. Namely,
sudo apt install libsndfile1
pip install fairseq2

However, I get this error:
Collecting fairseq2
Using cached fairseq2-0.2.1-py3-none-any.whl.metadata (1.2 kB)
INFO: pip is looking at multiple versions of fairseq2 to determine which version is compatible with other requirements. This could take a while.
Using cached fairseq2-0.2.0-py3-none-any.whl.metadata (1.2 kB)
Using cached fairseq2-0.1.1-py3-none-any.whl.metadata (1.2 kB)
Using cached fairseq2-0.1.0-py3-none-any.whl.metadata (1.2 kB)
ERROR: Cannot install fairseq2==0.1.0, fairseq2==0.1.1, fairseq2==0.2.0 and fairseq2==0.2.1 because these package versions have conflicting dependencies.

The conflict is caused by:
fairseq2 0.2.1 depends on fairseq2n==0.2.1
fairseq2 0.2.0 depends on fairseq2n==0.2.0
fairseq2 0.1.1 depends on fairseq2n==0.1.1
fairseq2 0.1.0 depends on fairseq2n==0.1.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

I figured out the issue and the solution. When I created the conda environment, the default version of python was not compatible so I upgraded the python version and it worked. So if anyone faces the same issue, they can try this out.