Open arpcode opened 2 years ago
You should install the suitable torch version for this command. I recommend installing torch==1.6.0 torchvision==0.7.0. It works for me. :)
I have the same problem. I tried to upgrade the torch and torchvision version to 1.6.0 and 0.7.0 respectively but it doesn't help
Did you try installing via pip install fairseq
? I ran into the same issue when I tried to pip install the editable version. I had to uninstall it and reinstall with the aforementioned command.
pip installing fairseq changes the error to the following for me:
[/usr/lib/python3.8/distutils/dist.py](https://localhost:8080/#) in _parse_command_opts(self, parser, args)
544 # to be sure that the basic "command" interface is implemented.
545 if not issubclass(cmd_class, Command):
--> 546 raise DistutilsClassError(
547 "command class %s must subclass Command" % cmd_class)
548
DistutilsClassError: command class <class 'torch.utils.cpp_extension.BuildExtension'> must subclass Command
xlmr = torch.hub.load('pytorch/fairseq', 'xlmr.large')
I get the following error message -
I've seen this posted time and again, but none of the threads provide a solution.