Fairseq: Unable to install fairseq-0.10.0 via downloaded/pulled source code

Created on 17 Nov 2020  路  3Comments  路  Source: pytorch/fairseq

馃悰 Bug

error: package directory 'fairseq/model_parallel/megatron/mpu' does not exist

To Reproduce

Steps to reproduce the behavior (always include the command you ran):

$ pip install --editable ./
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///[***]/workspace/fairseq-0.10.0
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: python [***]/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpa_9w5hkn
         cwd: [***]/fairseq-0.10.0
    Complete output (9 lines):
    running dist_info
    creating /tmp/pip-modern-metadata-hrku8ega/fairseq.egg-info
    writing /tmp/pip-modern-metadata-hrku8ega/fairseq.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-modern-metadata-hrku8ega/fairseq.egg-info/dependency_links.txt
    writing entry points to /tmp/pip-modern-metadata-hrku8ega/fairseq.egg-info/entry_points.txt
    writing requirements to /tmp/pip-modern-metadata-hrku8ega/fairseq.egg-info/requires.txt
    writing top-level names to /tmp/pip-modern-metadata-hrku8ega/fairseq.egg-info/top_level.txt
    writing manifest file '/tmp/pip-modern-metadata-hrku8ega/fairseq.egg-info/SOURCES.txt'
    error: package directory 'fairseq/model_parallel/megatron/mpu' does not exist
    ----------------------------------------
ERROR: Command errored out with exit status 1: python [***]/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpa_9w5hkn Check the logs for full command output.

Code sample

Environment

  • fairseq Version (e.g., 1.0 or master):0.10.0
  • PyTorch Version (e.g., 1.0) 1.7.0
  • OS (e.g., Linux): Ubuntu18.04
  • How you installed fairseq (pip, source): source
  • Build command you used (if compiling from source): pip install --editable ./
  • Python version: 3.7.9

Additional context

bug

Most helpful comment

Can you try running

git submodule sync
git submodule update --init --recursive

All 3 comments

Can you try running

git submodule sync
git submodule update --init --recursive

Can you try running

git submodule sync
git submodule update --init --recursive

Thanks! It worked, so it should be a wrong submodule dependency?

For the 0.10.0 release the setup instructions should be:

git submodule sync
git submodule update --init --recursive
pip install --editable .

I'll update the README and also try to release some prebuilt wheels soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tyoc213 picture tyoc213  路  3Comments

prihoda picture prihoda  路  3Comments

AranKomat picture AranKomat  路  3Comments

ashim95 picture ashim95  路  3Comments

chengfx picture chengfx  路  3Comments