0

I have python 3.7.5 and Python 3.8 installed on the same windows 10 machine. They were both installed from python.org/downloads. When I run pip install coverage (using the latest release of pip) it installs coverage with c extensions under 3.7.5 and without c extensions under 3.8.2.

How can I force coverage to install with c extensions, as the performance is terrible without them?

It appears 3.7.5 downloads: https://files.pythonhosted.org/packages/4b/c7/6b1af1c8806fa047469b19861a3438f9ce785aa41c831c15d676ccaaa726/coverage-5.0.3-cp37-cp37m-win32.whl

where as 3.8.2 downloads: coverage-5.0.3.tar.gz

The later being "without c extensions"

13
  • What version did you install? I see that coverage.py has Windows binary wheels available, including for both 3.7 and 3.8 (and even 3.9!), so perhaps just reinstall? Commented Feb 28, 2020 at 13:41
  • Originally I installed using poetry, then I installed using pip. Both installed version 5.0.3. When I did so for 3.7 it installed version 4.5.4 Commented Feb 28, 2020 at 13:45
  • Try running pip install --force-reinstall --only-binary :all: -v coverage to demand that a binary (wheel) distribution is picked, and let you know, in minute detail, what pip is finding and deciding. Commented Feb 28, 2020 at 13:46
  • Right, 4.5.4 did not have 3.8 wheels, not for Windows anyway. Commented Feb 28, 2020 at 13:48
  • also, running pip install with no switches will not upgrade an already installed older version. If 4.5.x is installed, you won't get the 5.0.x release with a 3.8 wheels. Commented Feb 28, 2020 at 13:49

1 Answer 1

0

There are no valid coverage wheel for Windows and Python 3.8 at the moment.

The 5.0.3 wheels on PyPI are marked as compatible with cp38-cp38m-win_amd64, so CPython 3.8, with the cp38m ABI variant, for 64-bit Windows.

But, there is no such ABI variant any more. Python 3.8 no longer has a m (--with-pymalloc) binary variant, because builds with or without --with-pymalloc are now ABI compatible.

Pip has followed suit and stopped adding the m flag when looking for wheels, and the wheel project, which creates these distribution files also dropped the m flag.

However, coverage.py is using an older release of wheel to build the distributions, they are using 0.33.1, while the above changes landed in version 0.33.5. You already filed a bug report with the project, I've added my findings there too.

Luckily, the flag is superficial. You can download the wheel file directly from PyPI, rename the file (removing the m from cp38m) and then use pip install path/to/renamed/coverage-5.0.3-cp38-cp38m-win_amd64.whl.

Note: the same issue applies to the 3.9 wheels.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.