Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'examples.speech_to_text' #3087

Closed
pyyush opened this issue Jan 1, 2021 · 1 comment
Closed

ModuleNotFoundError: No module named 'examples.speech_to_text' #3087

pyyush opened this issue Jan 1, 2021 · 1 comment

Comments

@pyyush
Copy link

pyyush commented Jan 1, 2021

🐛 Bug

Successfully installed fairseq but got ModuleNotFoundError: No module named 'examples.speech_to_text'

To Reproduce

Steps to reproduce the behavior:

  1. git clone https://github.com/pytorch/fairseq

  2. cd fairseq

  3. rm pyproject.toml PR #1697 makes pip install --editable . not work #1977 (comment)

  4. pip install --editable .
    Defaulting to user installation because normal site-packages is not writeable
    Obtaining file:///N/slate/piyush/fairseq
    Requirement already satisfied: cffi in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (1.14.1)
    Requirement already satisfied: cython in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (0.29.21)
    Requirement already satisfied: hydra-core<1.1 in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (1.0.4)
    Requirement already satisfied: omegaconf<2.1 in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (2.0.5)
    Requirement already satisfied: regex in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (2020.7.14)
    Requirement already satisfied: sacrebleu>=1.4.12 in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (1.4.13)
    Requirement already satisfied: torch in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (1.6.0)
    Requirement already satisfied: tqdm in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (4.48.0)
    Requirement already satisfied: numpy in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from fairseq==1.0.0a0+01fcec5) (1.18.5)
    Requirement already satisfied: pycparser in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from cffi->fairseq==1.0.0a0+01fcec5) (2.20)
    Requirement already satisfied: antlr4-python3-runtime==4.8 in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from hydra-core<1.1->fairseq==1.0.0a0+01fcec5) (4.8)
    Requirement already satisfied: importlib-resources; python_version < "3.9" in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from hydra-core<1.1->fairseq==1.0.0a0+01fcec5) (3.3.0)
    Requirement already satisfied: typing-extensions in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from omegaconf<2.1->fairseq==1.0.0a0+01fcec5) (3.7.4.2)
    Requirement already satisfied: PyYAML>=5.1.* in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from omegaconf<2.1->fairseq==1.0.0a0+01fcec5) (5.3.1)
    Requirement already satisfied: portalocker in /geode2/home/u070/piyush/Carbonate/.local/lib/python3.8/site-packages (from sacrebleu>=1.4.12->fairseq==1.0.0a0+01fcec5) (2.0.0)
    Requirement already satisfied: future in /geode2/soft/hps/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages (from torch->fairseq==1.0.0a0+01fcec5) (0.18.2)
    Installing collected packages: fairseq
    Running setup.py develop for fairseq
    Successfully installed fairseq

  5. python examples/speech_to_text/prep_covost_data.py -d /N/slate/piyush/fairseq/CoVoST -s zh-CN -t en --vocab-type unigram --vocab-size 300
    Traceback (most recent call last):
    File "examples/speech_to_text/prep_covost_data.py", line 18, in
    from examples.speech_to_text.data_utils import (
    ModuleNotFoundError: No module named 'examples.speech_to_text'

@pyyush
Copy link
Author

pyyush commented Jan 5, 2021

Solution

  1. git clone https://github.com/pytorch/fairseq.git
  2. cd fairseq
  3. pip install --editable ./
  4. python setup.py build develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant