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

importlib.metadata.PackageNotFoundError: fairseq #4255

Open
dorost1234 opened this issue Mar 7, 2022 · 1 comment
Open

importlib.metadata.PackageNotFoundError: fairseq #4255

dorost1234 opened this issue Mar 7, 2022 · 1 comment

Comments

@dorost1234
Copy link

🐛 Bug

Hi
I am trying to run a translation example here https://github.com/pytorch/fairseq/tree/main/examples/translation
running preprocess:

TEXT=examples/translation/iwslt14.tokenized.de-en
fairseq-preprocess --source-lang de --target-lang en \
    --trainpref $TEXT/train --validpref $TEXT/valid --testpref $TEXT/test \
    --destdir data-bin/iwslt14.tokenized.de-en \
    --workers 20

I am getting this error

Traceback (most recent call last):
  File "/user/dara/libs/anaconda3/envs/fairseq/bin/fairseq-preprocess", line 33, in <module>
    sys.exit(load_entry_point('fairseq', 'console_scripts', 'fairseq-preprocess')())
  File "/user/dara/libs/anaconda3/envs/fairseq/bin/fairseq-preprocess", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/user/dara/libs/anaconda3/envs/fairseq/lib/python3.8/importlib/metadata.py", line 503, in distribution
    return Distribution.from_name(distribution_name)
  File "/user/dara/libs/anaconda3/envs/fairseq/lib/python3.8/importlib/metadata.py", line 177, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: fairseq

Expected behavior

this needs to run as per documentation

Environment

  • OS (e.g., Linux): linux
  • How you installed fairseq (pip, source): source
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             4.5                       1_gnu  
antlr4-python3-runtime    4.8                      pypi_0    pypi
bitarray                  2.4.0                    pypi_0    pypi
blas                      1.0                         mkl  
bzip2                     1.0.8                h7b6447c_0  
ca-certificates           2022.2.1             h06a4308_0  
certifi                   2021.10.8        py38h06a4308_2  
cffi                      1.15.0                   pypi_0    pypi
charset-normalizer        2.0.12                   pypi_0    pypi
click                     8.0.4                    pypi_0    pypi
colorama                  0.4.4                    pypi_0    pypi
cudatoolkit               10.2.89              hfd86e86_1  
cython                    0.29.28                  pypi_0    pypi
fastbpe                   0.1.0                    pypi_0    pypi
ffmpeg                    4.3                  hf484d3e_0    pytorch
freetype                  2.11.0               h70c0345_0  
giflib                    5.2.1                h7b6447c_0  
gmp                       6.2.1                h2531618_2  
gnutls                    3.6.15               he1e5248_0  
hydra-core                1.0.7                    pypi_0    pypi
idna                      3.3                      pypi_0    pypi
importlib-resources       5.4.0                    pypi_0    pypi
intel-openmp              2021.4.0          h06a4308_3561  
joblib                    1.1.0                    pypi_0    pypi
jpeg                      9d                   h7f8727e_0  
lame                      3.100                h7b6447c_0  
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.35.1               h7274673_9  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 9.3.0               h5101ec6_17  
libgomp                   9.3.0               h5101ec6_17  
libiconv                  1.15                 h63c8f33_5  
libidn2                   2.3.2                h7f8727e_0  
libpng                    1.6.37               hbc83047_0  
libstdcxx-ng              9.3.0               hd4cf53a_17  
libtasn1                  4.16.0               h27cfd23_0  
libtiff                   4.2.0                h85742a9_0  
libunistring              0.9.10               h27cfd23_0  
libuv                     1.40.0               h7b6447c_0  
libwebp                   1.2.2                h55f646e_0  
libwebp-base              1.2.2                h7f8727e_0  
lz4-c                     1.9.3                h295c915_1  
mkl                       2021.4.0           h06a4308_640  
mkl-service               2.4.0            py38h7f8727e_0  
mkl_fft                   1.3.1            py38hd3c417c_0  
mkl_random                1.2.2            py38h51133e4_0  
ncurses                   6.3                  h7f8727e_2  
nettle                    3.7.3                hbbd107a_1  
numpy                     1.21.2           py38h20f2e39_0  
numpy-base                1.21.2           py38h79a1101_0  
omegaconf                 2.0.6                    pypi_0    pypi
openh264                  2.1.1                h4ff587b_0  
openssl                   1.1.1m               h7f8727e_0  
pillow                    9.0.1            py38h22f2fdc_0  
pip                       21.2.4           py38h06a4308_0  
portalocker               2.4.0                    pypi_0    pypi
pyarrow                   7.0.0                    pypi_0    pypi
pycparser                 2.21                     pypi_0    pypi
python                    3.8.12               h12debd9_0  
pytorch                   1.10.2          py3.8_cuda10.2_cudnn7.6.5_0    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pyyaml                    6.0                      pypi_0    pypi
readline                  8.1.2                h7f8727e_1  
regex                     2022.3.2                 pypi_0    pypi
requests                  2.27.1                   pypi_0    pypi
sacrebleu                 2.0.0                    pypi_0    pypi
sacremoses                0.0.47                   pypi_0    pypi
setuptools                58.0.4           py38h06a4308_0  
six                       1.16.0             pyhd3eb1b0_1  
sqlite                    3.37.2               hc218d9a_0  
tabulate                  0.8.9                    pypi_0    pypi
tk                        8.6.11               h1ccaba5_0  
torchaudio                0.10.2               py38_cu102    pytorch
torchvision               0.11.3               py38_cu102    pytorch
tqdm                      4.63.0                   pypi_0    pypi
typing_extensions         3.10.0.2           pyh06a4308_0  
urllib3                   1.26.8                   pypi_0    pypi
wheel                     0.37.1             pyhd3eb1b0_0  
xz                        5.2.5                h7b6447c_0  
zipp                      3.7.0                    pypi_0    pypi
zlib                      1.2.11               h7f8727e_4  
zstd                      1.4.9                haebb681_0 
@kkeleve
Copy link

kkeleve commented Jun 30, 2022

you can try it export PYTHONPATH=$PYTHONPATH:/root/fairseq/

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

2 participants