Unable to build a wheel - error: invalid command 'bdist_wheel'

I tried everything on this very related question: Why can't I create a wheel in python?

But I still get:

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' 

Context:

 $ pip --version pip 8.1.1 from /home/bdillman/proj/fashion/lib/python3.5/site-packages (python 3.5) $ python -c "import setuptools; print(setuptools.__version__)" 18.2 $ python --version Python 3.5.1 $ which python /home/bdillman/workspace/fashion/bin/python $ pip list Mako (1.0.4) MarkupSafe (0.23) peewee (2.8.0) pip (8.1.1) PyYAML (3.11) setuptools (21.0.0) wheel (0.29.0) 

So it looks like everything is installed and the versions look good (I think). Does anyone have any ideas on what to check for further diagnosis?

Exact team:

 $ python setup.py bdist_wheel 

I also tried

 $ sudo python setup.py bdist_wheel 

I also did pip install --upgrade setuptools and pip install --upgrade wheel and they are updated.

+6
source share
2 answers

I decided. I'm not sure how, but my python virtual environment was messed up, and pip uses a different virtual environment. I fixed my virtual environment and now everything is working fine.

I am new to python and virtual environments, and I think that maybe I copied the entire project containing the virtual environment and then edited it (and skipped some links, say, at the top of the pip script).

+2
source

It should be noted that you are using setuptools , not distutils .

+1
source

All Articles