pip install error: “Unknown archive format: .whl”

I’m new to virtualenv (on windows). I’m trying to use pip (1.5) install a local wheel file, but it is failing.

The command is:

pip install --no-index -f C:/Users/<User>/Download openpyxl

In the pip.log, I can see where it finds the correct file, but then doesn’t try to install it:

  Skipping link file:///C:/Users/<User>/Download/openpyxl-1.7.0-py2.py3-none-any.whl; unknown archive format: .whl

I have wheel (version 0.22) install globally as well as in the virtual environment. Any idea how I can get .whl to be a recognized format?

Best answer

It appears wheel support is disabled.

Make sure that you have setuptools version 0.8 or newer installed, and that the use-wheel option is not set to false in $HOME/.pip/pip.conf.

Upgrading setuptools is easy enough if pip is already working:

pip install --upgrade setuptools

but note that older virtualenv versions can depend on older setuptools versions; you’ll need to make sure that virtualenv is also up to date.