make pip ignore an existing wheel

ivan_pozdeev picture ivan_pozdeev · Jul 8, 2016 · Viewed 13.7k times · Source

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?

Answer

user707650 picture user707650 · Jul 8, 2016

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