What is the meaning of “Failed building wheel for X” in pip install?

后端 未结 12 1021
执念已碎
执念已碎 2020-12-07 13:54

This is a truly popular question here at SO, but none of the many answers I have looked at, clearly explain what this error really mean, and why it occurs.

One sour

相关标签:
12条回答
  • 2020-12-07 13:58

    I would like to add that if you only have Python3 on your system then you need to start using pip3 instead of pip.

    You can install pip3 using the following command;

    sudo apt install python3-pip -y
    

    After this you can try to install the package you need with;

    sudo pip3 install <package>
    
    0 讨论(0)
  • 2020-12-07 13:59

    Try this:

    sudo apt-get install libpcap-dev libpq-dev

    It has worked for me when I have installed these two.

    See the link here for more information

    0 讨论(0)
  • 2020-12-07 14:00

    On Ubuntu 18.04, I ran into this issue because the apt package for wheel does not include the wheel command. I think pip tries to import the wheel python package, and if that succeeds assumes that the wheel command is also available. Ubuntu breaks that assumption.

    The apt python3 code package is named python3-wheel. This is installed automatically because python3-pip recommends it.

    The apt python3 wheel command package is named python-wheel-common. Installing this too fixes the "failed building wheel" errors for me.

    0 讨论(0)
  • 2020-12-07 14:00

    This may Help you ! ....

    Uninstalling pycparser:

    pip uninstall pycparser

    Reinstall pycparser:

    pip install pycparser

    I got same error while installing termcolor and I fixed it by reinstalling it .

    0 讨论(0)
  • 2020-12-07 14:03

    I had the same problem while installing Brotli

    ERROR

    Failed building wheel for Brotli
    

    I solved it by downloading the .whl file from here and installing it using the below command

    C:\Users\{user_name}\Downloads>pip install Brotli-1.0.9-cp39-cp39-win_amd64.whl
    
    0 讨论(0)
  • 2020-12-07 14:03

    In my case, update the pip versión after create the venv, this update pip from 9.0.1 to 20.3.1

    python3 -m venv env/python
    source env/python/bin/activate
    pip3 install pip --upgrade
    

    But, the message was...

    Using legacy 'setup.py install' for django-avatar, since package 'wheel' is not installed.
    

    Then, I install wheel package after update pip

    python3 -m venv env/python
    source env/python/bin/activate
    pip3 install --upgrade pip
    pip3 install wheel
    

    And the message was...

    Building wheel for django-avatar (setup.py): started
    default:   Building wheel for django-avatar (setup.py): finished with status 'done'
    
    0 讨论(0)
提交回复
热议问题