make pip ignore an existing wheel
22,896
Try using
pip install <package> --no-binary :all:
You can find this option (and the values it takes) in pip install --help
.
There's also the --no-use-wheel
option, but that has been deprecated in favour of the above and removed in pip
10.0.0
.
Here is reference in official documentation:
https://pip.pypa.io/en/stable/reference/pip_install/#install-no-binary
Related videos on Youtube
Author by
ivan_pozdeev
Updated on September 12, 2020Comments
-
ivan_pozdeev over 3 years
If a
.whl
is available online,pip
always installs it rather than compiling from source. However, for some specific module, the wheel happened to be compiled for the next processor generation and doesn't run on a specific machine.If I command it to just download the package, then it still downloads the wheel rather than source. Does
pip
have some mechanism to override this preference?-
ivan_pozdeev almost 8 years@MosesKoledoye No, this isn't affected by the local cache.
-
Moses Koledoye almost 8 yearsPardon me. I think you could do the install directly from
git
if the source has one withpip install git+https://repourl
-
ivan_pozdeev almost 8 years@MosesKoledoye then I need to somehow manually learn that the package has a git repo online and where it is. FWIW, I can locale the source manually and compile it, all without
pip
. -
Antti Haapala -- Слава Україні almost 8 yearsalso, you should report such a wheel to upstream, clearly its version is not tagged correctly
-
ivan_pozdeev almost 8 years@AnttiHaapala it's tagged "win32". I'm not aware of any more specific (e.g. "ix86") markings existing for wheels. Are there?
-
-
TheDudeAbides over 4 yearsRan into this problem with a homebrew Python installation and a wheel for python-levenshtein that was built with 4-byte Unicode (UCS-4) symbols, whereas my Python was only UCS-2. The traceback I got was similar to that described here:
undefined symbol: PyUnicodeUCS4_FromUnicode
. Usingpip install --no-binary
to install from source (ignoring the wheel) totally did the trick! -
Tobias Feil over 2 yearsSuggested edit queue is full but here is the correct link: pip.pypa.io/en/stable/cli/pip_install/#cmdoption-no-binary