Open nynMeta opened 2 years ago
I have just encoutered this as well. I managed to get this working by commenting out the torch
and torchaudio
dependencies in setup.py
and this got me unblocked.
This isn't a fairseq issue. This is regular pip behaviour see https://stackoverflow.com/questions/2861183/upgrade-package-without-upgrading-dependencies-using-pip
No, it's not "regular pip behavior". The StackOverflow question you pointed us to is for upgrading packages which may require an upgrade of its dependencies. We're installing an editable version which should obey our currently installed dependencies. This is especially problematic since the version of pytorch isn't pinned (and therefore installing fairseq shouldn't do something dumb like installing pytorch built against a different version of CUDA...).
In short, it's definitively a bug. From the pypa documentation here (emphasis mine):
When your project is installed (e.g., using pip), all of the dependencies not already installed will be located (via PyPI), downloaded, built (if necessary), and installed
I have just encoutered this as well. I managed to get this working by commenting out the
torch
andtorchaudio
dependencies insetup.py
and this got me unblocked.
Thanks for your tip.
I got a work around by ignoring installing dependencies: pip install --no-deps -e .
since I found I probably had all the required deps installed. However, I didn't do a rigorous test yet.
I think in another issue #4733 , this problem is fully discussed. For my case, adding --no-build-isolation
will be ok.
I think in another issue #4733 , this problem is fully discussed. For my case, adding
--no-build-isolation
will be ok.
Why did I add this option and it still doesn't work? My order is pip install --editable ./ --no-build-isolation
I have just encoutered this as well. I managed to get this working by commenting out the
torch
andtorchaudio
dependencies insetup.py
and this got me unblocked.Thanks for your tip. I got a work around by ignoring installing dependencies:
pip install --no-deps -e .
since I found I probably had all the required deps installed. However, I didn't do a rigorous test yet.
Thank you very much, I tried your suggestion and it worked.
I have a source-compiled version of pytorch (
1.12.0a0+git67ece03
). When I tried to install fairseq, it uninstall the installed pytorch and install another version (1.12.1+cu102
). Does anyone know how to resolve the issue? Here is the log ofpip install -e .
of Fairseq: