Skip to content

Error: Invalid command ‘bdist_wheel’: Quick Fix

  • by
  • 3 min read

Linux has come a long way from being all terminal and commands. Linux distros these days come complete with proper GUIs and even App stores. However, that doesn’t make them immune to random bugs and glitches that you might run into when installing software or doing just about anything.

In this article, we’re talking about the “invalid command ‘bdist_wheel'” error in Linux and giving you five solutions for the problem.

Also read: How does import work in Python?

Update Linux

Updating Linux is one the simplest and easiest ways of resolving just about any package related problem. You have to run the following command in a terminal window.

sudo apt-get update && sudo apt-get upgrade
Error: Invalid command 'bdist_wheel': 5 Fixes

Now try running Wheel setup again. 

Update Python and Pip

Python and its package manager Pip both get frequent updates. Using an older version can lead to problems when installing external packages like Wheel. 

While updating Python is as simple as running the command in the fix mentioned above, you can update pip by typing the following command in a terminal.

pip install upgrade
Error: Invalid command 'bdist_wheel': 5 Fixes

Install Wheel

bdist_wheel is a part of the Python Wheel library. Installing Wheel will also make the command available. You can install Wheel or any other Python library using pip.

pip install wheel
Error: Invalid command 'bdist_wheel': 5 Fixes

Now try running the command again, and it should run just fine. 

python bdist_wheel

Install Python-dev packages

If installing Wheel didn’t do the trick, you might have to install the entire Python-dev package. Open a terminal and enter the following commands one at a time. 

sudo apt-get install gcc libpq-dev -y
sudo apt-get install python-dev python-pip -y
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel -y
pip3 install wheel
Error: Invalid command 'bdist_wheel': 5 Fixes

The bdist_wheel package should run fine now.

Manually enable Wheel installation

If you’ve installed Wheel using pip successfully, but the installation isn’t working, try adding the following snippet to your file for bdist_wheel.

setup( ... setup_requires=['wheel'] )

Make sure you install Wheel before adding this line. 

Also read: Is Python case sensitive when dealing with identifiers?

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: