pypa / packaging-problems

An issue tracker for the problems in packaging
150 stars 35 forks source link

Trouble following packaging libraries tutorial - error: invalid command 'bdist_wheel' #324

Open cvsgbhn opened 4 years ago

cvsgbhn commented 4 years ago

Thank you for providing feedback on Python packaging!

To help us help you, please fill out as much of the following as you can. If a question is not relevant, feel free to skip it.

  1. OS: Windows 10 Home edition

  2. What is your Python version? 3.8

  3. What version of pip do you have? 20.0.2

  4. If following an online tutorial or guide, please provide a link to the page or section giving you trouble:

https://packaging.python.org/tutorials/packaging-projects/ Generating distribution archives¶

  1. Could you describe your issue in as much detail as possible?

I need to create wheel for one custom package written on C (not by me). When I do python3 setup.py sdist bdist_wheel - nothing happens. When I try do as always on windows (using -m): python -m setup.py sdist bdist_wheel it returns me next message:

usage: -m [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: -m --help [cmd1 cmd2 ...]
   or: -m --help-commands
   or: -m cmd --help

error: invalid command 'bdist_wheel'
uranusjr commented 4 years ago

When I try do as always on windows (using -m)

This sounds wrong; the equivalent of python3 on Windows is not python -m, but py -3 (or python).

cvsgbhn commented 4 years ago

Thanks for correction! I didn't know about it. But this still doesn't work, though the error is different 😞

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
uranusjr commented 4 years ago

Does the “invalid command” line still show? What does the command before setup.py show; could you post it? (The one that ends with setuptools wheel.)

getnoel commented 4 years ago

I also got this error. It worked after deactivating my virtualenv.

merwok commented 4 years ago

This error:

error: invalid command 'bdist_wheel'

usually means that the Python you are running with doesn’t have wheel installed. To remedy:

python -m pip install wheel
# then retry
python setup.py sdist bdist_wheel

If you don’t run python but something else (python3 or py or /path/to/my/python, use the exact same form for both calls, to ensure it is the same Python (and not for example a global Python for pip install but a virtualenv Python for setup.py)

ei8fdb commented 4 years ago

@cvsgbhn Have you run the command @merwok has suggested above?

If so, what was the outcome?

We'll close the ticket in a few days if we don't hear back)