fairseq-preprocess reported an error that fairseq could not be found

577 views
Skip to first unread message

yi sun

unread,
Feb 23, 2022, 10:51:44 PM2/23/22
to fairseq Users
I followed the order on the official website and encountered an error that the package could not be found.  please what should i do
I have tried running on a new server, but  always get this error
code:
git clone https://github.com/pytorch/fairseq
cd fairseq
pip install --editable .
fairseq-preprocess --source-lang zh --target-lang en
--trainpref ~/data_prepare_wmt17/train
--validpref ~/data_prepare_wmt17/valid
--testpref ~/data_prepare_wmt17/test
--workers 1 --destdir ~/data-bin/wmt17_zh_en
error:
Traceback (most recent call last):
File "/usr/bin/fairseq-preprocess", line 33, in
sys.exit(load_entry_point('fairseq', 'console_scripts', 'fairseq-preprocess')())
File "/usr/bin/fairseq-preprocess", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.9/importlib/metadata.py", line 524, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.9/importlib/metadata.py", line 187, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: fairseq
environment:
fairseq Version: 0.102(lastest)
PyTorch Version:1.10
OS : Ubuntu 18.04.5
Python:3.9
Cuda:11.3
GPU:3090*1

Martina Nacheva

unread,
Nov 24, 2023, 5:10:58 PM11/24/23
to fairseq Users
you need to set the path I think. 

something like 

export PYTHONPATH=$PYTHONPATH:/root/fairseq/

Reply all
Reply to author
Forward
0 new messages