Forcing `pip` to recompile a previously installed package (numpy) after switching to a different Python binary Forcing `pip` to recompile a previously installed package (numpy) after switching to a different Python binary numpy numpy

Forcing `pip` to recompile a previously installed package (numpy) after switching to a different Python binary


You can use --no-binary and --ignore-installed to rebuild a package as follows

pip install --user --force-reinstall --ignore-installed --no-binary :all: PackageName


The problem is solved by pip uninstalling numpy (or any other troublesome package), then running

pip install numpy --no-cache-dir

to prevent pip from simply taking the cached installation and repeating it.