Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

I have bumped into the same problem with wheel when downloaded requirements with:

pip install --download /pip_mirror six django_debug_toolbar
dir2pi /pip_mirror/

and tried to install them with:

pip install six-1.7.3-py2.py3-none-any.whl

Even though there is no any config at $HOME/.pip/pip.conf and

$ easy_install --version
setuptools 5.4.1

I still get:

unknown archive format: .whl

I have managed to avoid the problem by adding --no-use-wheel like this, so got only tar.gz files (instead of .whl)

pip install --no-use-wheel --download /pip_mirror six django_debug_toolbar
dir2pi /pip_mirror/

After this pip install --index-url=file:///pip_mirror/simple/ six went without any problems

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top