fairseq2: pip install fairseq2 - doesn't work

pip install fairseq2
Collecting fairseq2
  Obtaining dependency information for fairseq2 from https://files.pythonhosted.org/packages/cd/27/46c14e28e8cb0aa602660ce64d4547a37f460d382e4fcf94f2a53d47e5b0/fairseq2-0.1.0-py3-none-any.whl.metadata
  Using cached fairseq2-0.1.0-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.
ERROR: Could not find a version that satisfies the requirement fairseq2n==0.1.0 (from fairseq2) (from versions: none)
ERROR: No matching distribution found for fairseq2n==0.1.0

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 13
  • Comments: 47 (7 by maintainers)

Most upvoted comments

Hey folks, I am working on v0.1.1 right now that will fix some of the issues you have been experiencing. Two side notes though:

  • We do not support Windows and have no plans to support it (mostly due to lack of bandwidth and lack of experience in Windows development). I will make sure that I have some installation instructions for WSL2 though. Considering that WSL2 now has pretty stable CUDA support, I hope that this will be a sufficient middle ground for Windows users.
  • For Mac users, I am also working on pre-built ARM64 binaries. We use GitHub Actions for our CI and unfortunately GHA still has no support for M1/M2 runners, so this requires some manual work on my end.

I expect to finish v0.1.1 by tomorrow (08/29), and will keep you posted!

Attempting to build from source also fails with a tbb-devel requirement failure:

 fairseq2  pip install torch -r fairseq2n/python/requirements-build.txt
Collecting torch
  Using cached torch-2.0.1-cp38-cp38-win_amd64.whl (172.4 MB)
Collecting cmake~=3.26
  Downloading cmake-3.27.2-py2.py3-none-win_amd64.whl (34.6 MB)
     |████████████████████████████████| 34.6 MB 6.8 MB/s
Collecting ninja~=1.11
  Downloading ninja-1.11.1-py2.py3-none-win_amd64.whl (313 kB)
     |████████████████████████████████| 313 kB ...
Requirement already satisfied: packaging~=23.1 in c:\users\pkahn\.pyenv\pyenv-win\versions\3.8.10\lib\site-packages (from -r fairseq2n/python/requirements-build.txt (line 3)) (23.1)
Collecting pip~=23.2
  Downloading pip-23.2.1-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB ...
Collecting setuptools~=67.8
  Using cached setuptools-67.8.0-py3-none-any.whl (1.1 MB)
ERROR: Could not find a version that satisfies the requirement tbb-devel==2021.8 (from versions: 2021.1.1, 2021.2.0, 2021.3.0, 2021.4.0, 2021.5.0, 2021.5.1, 2021.5.2, 2021.6.0, 2021.7.0, 2021.7.1, 2021.9.0, 2021.10.0)
ERROR: No matching distribution found for tbb-devel==2021.8

I’ve gotten through a few hurdles on Windows, but it’ll take me a few days to really get back to it:

git clone --recurse-submodules https://github.com/facebookresearch/fairseq2.git
cd fairseq2
# Manually change dependency tbb-devel to tbb-devel==2021.9
pip install torch -r fairseq2n/python/requirements-build.txt
cd fairseq2n
# TODO sndfile see https://gist.github.com/sveinse/97411b95d36a6b8c430d4d381b620ecb
cmake -GNinja -B build
cmake --build build
cd python
pip install -e .
cd ../..
$env:FAIRSEQ2N_DEVEL=1 
pip install -e .
cd ..
git clone --recurse-submodules --depth 1 https://github.com/facebookresearch/seamless_communication.git
cd seamless_communication
pip install .

I’ll bundle it up at some point when I’ve gotten it deployed.

For other Mac users, I created two script to build fairseq2 on the Mac. Tested on a M2 chipset. https://github.com/chipcode-nl/mac-fairseq2

Hey everyone, yesterday I released v0.1.1 that tries to address some of the issues you have been experiencing. I also significantly revised the installation instructions in README. We also have a pre-built package for Apple-silicon computers now. Please try the installation in a fresh environment by following the instructions in README and let me know how it goes. Thank you!

@rgryta we have couple places in our code base where we rely on fairseq2n. For instance we have a PyTorch native implementation of sentencepiece written in C++ and most of our models use that implementation for their tokenizers. Having said that, depending on users’ feedback, I will check whether I can refactor it even further and make it an optional dependency.

https://github.com/chipcode-nl/mac-fairseq2

@huangwei2913 this dude made a repo, I just followed the steps in the build bash file and it worked. Thanks for @chipcode-nl !

Hello, Same problem for me on :

5.15.0-79-generic #86~20.04.2-Ubuntu pip 20.0.2 python3.8

ERROR: Could not find a version that satisfies the requirement fairseq2n==0.1.0 (from fairseq2) (from versions: none) ERROR: No matching distribution found for fairseq2n==0.1.0 (from fairseq2)

using macOS. both installing from pip as well as

git clone https://github.com/facebookresearch/fairseq2.git
cd fairseq2
pip install .

returns an error for ERROR: Could not find a version that satisfies the requirement fairseq2n==0.1.0 (from fairseq2) (from versions: none) ERROR: No matching distribution found for fairseq2n==0.1.0

Thank you @silentlit for your assistance. A friend recommended that I try miniforge instead of virtualenvwrapper. This suggestion worked well, and I successfully installed fairseq2.

I find that, it might because python recognize macos version error. Activating your python env, import platform, and run platform.platform(). If the print is not equal to your macos version, this error would happen. Reboot and use the Terminal to create python env might fit this problem. It work for me.

windows 10 enterprise, python 3.10.5, the fairseq2 is not installed in my PC. If I install this package on Ubuntu, is it possible?

@chongthon Do you mind configuring CMake build with cmake -GNinja -DFAIRSEQ2N_INSTALL_STANDALONE=ON -B build?

Tested this option on Mac M2 and Mac Intel both compiled.

For someone use Linux, I just download it by upgrade pip:

pip install --upgrade pip
pip install fairseq2

That work for me

Python 3.11.4 Apple M1

% CFLAGS="-stdlib=libc++" pip install -e ./
Obtaining file:///Users/yokotoka/Documents/p/unbabeler/seamless_communication/fairseq2
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of fairseq2 to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement fairseq2n==0.1.0 (from fairseq2) (from versions: none)
ERROR: No matching distribution found for fairseq2n==0.1.0

Same. Apple Silicon, M1 Python 3.11

Following the Install from Source instructions: pip install . ERROR: Could not find a version that satisfies the requirement fairseq2n==0.1.0 (from fairseq2) (from versions: none) ERROR: No matching distribution found for fairseq2n==0.1.0

Same problem on

  1. Darwin Antons-MacBook-Pro.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64
  2. MacBook Pro m1 pro; macOS 13.5
  3. pip 23.0.1 from /opt/homebrew/lib/python3.11/site-packages/pip (python 3.11)
  4. Python 3.11.4

Same problem here - can’t install fairseq2 on Win, Python 3.10, torch 2.0.1. Hope this will be solved soon.

@rgryta we have couple places in our code base where we rely on fairseq2n. For instance we have a PyTorch native […] whether I can refactor it even further and make it an optional dependency.

Not complaining, by any means. You guys have been doing tremendously good work. I guess a temporary workaround for people without Linux would be to install a dummy fairseq2n module before installing fairseq2 wheel (from what I saw those are for any os) and then uninstall the former.