Here are the commands I am running:
$ python setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
$ pip --version
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)
$ python -c "import setuptools; print(setuptools.__version__)"
$ python --version
$ which python
Also, I am running a mac with homebrewed python
Here is my setup.py script:
I’m going absolutely crazy — I can’t figure out why this wouldn’t be working.
wheel package first:
pip install wheel
The documentation isn’t overly clear on this, but “the wheel project provides a bdist_wheel command for setuptools” actually means “the wheel package…”.
I also ran into the error message
invalid command 'bdist_wheel'
It turns out the package setup.py used distutils rather than setuptools.
Changing it as follows enabled me to build the wheel.
#from distutils.core import setup
from setuptools import setup
Update your setuptools, too.
pip install setuptools --upgrade
If that fails too, you could try with additional
I also ran into this all of a sudden, after it had previously worked, and it was because I was inside a virtualenv, and
wheel wasn’t installed in the virtualenv.
pip install --upgrade pip
for Python 3:
pip3 install --upgrade pip
Throwing in another answer: Try checking your
First, try to install
pip install wheel
This should tell you where wheel is installed, eg:
Requirement already satisfied: wheel in /usr/local/lib/python3.5/dist-packages
Then add the location of wheel to your
Now building a wheel should work fine.
python setup.py bdist_wheel
It could also be that you have a python3 system only.
You therefore have installed the necessary packages via pip3 install , like pip3 install wheel.
You’ll need to build your stuff using python3 specifically.
python3 setup.py sdist
python3 setup.py bdist_wheel
I tried everything said here without any luck, but found a workaround.
After running this command (and failing) :
Go to the temporary directory the tool made (given in the output of the last command), then execute
python setup.py bdist_wheel. The
.whl file is in the