pythonpython-3.xpipvirtualenvpep517

Could not build wheels for _ which use PEP 517 and cannot be installed directly


I am trying to install a package which uses PEP 517. The newest version of Pip won't allow me to install it due to an error involving building wheels for PEP 517.

In the past, I've solved this issue by downgrading Pip, installing the package and upgrading Pip back to the latest version. However, after I downgrade pip in my virtualenv, if I try to run pip install black I get the error

No module named 'pip._internal.cli.main'

How can I solve this?


Solution

  • The easiest solution to deal with the error

    "Could not build wheels for ____ which use PEP 517 and cannot be installed directly" 
    

    is the following:

    sudo pip3 install _____ --no-binary :all:
    

    Where ____ is obviously the name of the library you want to install.