question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ubuntu 20.04 "error: invalid command 'bdist_wheel'"

See original GitHub issue

I followed the procedure on Lektor’s webpage, and despite having installed all prerequisites, I get the following errors:

Building wheel for inifile (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-af6y5v9m/inifile/setup.py'"'"'; __file__='"'"'/tmp/pip-install-af6y5v9m/inifile/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ayl9hhi2
       cwd: /tmp/pip-install-af6y5v9m/inifile/
  Complete output (6 lines):
  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'
  ----------------------------------------
  ERROR: Failed building wheel for inifile
  Running setup.py clean for inifile
  Building wheel for EXIFRead (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-af6y5v9m/EXIFRead/setup.py'"'"'; __file__='"'"'/tmp/pip-install-af6y5v9m/EXIFRead/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-mxtpmzko
       cwd: /tmp/pip-install-af6y5v9m/EXIFRead/
  Complete output (7 lines):
  Warning: 'classifiers' should be a list, got type 'tuple'
  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'
  ----------------------------------------
  ERROR: Failed building wheel for EXIFRead
  Running setup.py clean for EXIFRead
  Building wheel for watchdog (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-af6y5v9m/watchdog/setup.py'"'"'; __file__='"'"'/tmp/pip-install-af6y5v9m/watchdog/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-5pxag3tc
       cwd: /tmp/pip-install-af6y5v9m/watchdog/
  Complete output (6 lines):
  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'
  ----------------------------------------
  ERROR: Failed building wheel for watchdog
  Running setup.py clean for watchdog
  Building wheel for pathtools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/lib/lektor/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-af6y5v9m/pathtools/setup.py'"'"'; __file__='"'"'/tmp/pip-install-af6y5v9m/pathtools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-xurhnhnp
       cwd: /tmp/pip-install-af6y5v9m/pathtools/
  Complete output (8 lines):
  /tmp/pip-install-af6y5v9m/pathtools/setup.py:25: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp
  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'
  ----------------------------------------
  ERROR: Failed building wheel for pathtools

Any sugestions? It installed without issue in windows, so I suppose it is something related to Ubuntu 20.04.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
andresperezceracommented, Jun 1, 2020

@xlotlu Sorry, solved it as mentioned, however I need practice at the vps instance, I’ll reset and proceed again. I’ll be back with results in about 4 hours (currently busy)

1reaction
andresperezceracommented, Aug 24, 2021

I’m updating this topic to point that the best install method at the moment is using pipx:

$ python3 -m pip install --user pipx
$ python3 -m pipx ensurepath

Close and reopen terminal

$ pipx install lektor

I’ll close this issue with this and point out 3 things, 2 and 3 are derived from 1:

  • First, the install script should be set aside to prioritize pipx.
  • Second, since pipx won’t do system-wide, we have to determine wether that’s important.
  • Third, since pipx only workd on 3.6+ we should decide whether all previous version are deprecated.

For further discussion please go to #915

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is python setup.py saying invalid command 'bdist_wheel ...
Had to install the wheel package. Everything was up to date but still giving the error. pip install wheel. then python setup.py bdist_wheel....
Read more >
Error: invalid command 'bdist_wheel' - Snapcraft forum
Hi, I need yacron in my application. Here is simple yaml: name: yacron version: 1.0.0 summary: yacron description: A modern Cron replacement ...
Read more >
mysqlclient installation error: invalid command 'bdist_wheel'
I've seen this error with different packages. If you are using ubuntu, you should try with: sudo apt install build-essential python3-dev.
Read more >
error: invalid command 'bdist_wheel' ( Solved ) - Code the Best
Solution 1: Install Wheel Package · Solution 2: Install packages in Ubuntu Command · Solution 3: Update Setup Tools · Solution 4: Reinstall...
Read more >
Error: invalid command 'bdist_wheel' in Python | bobbyhadz
The Python "error: invalid command 'bdist_wheel'" occurs when the wheel package is not installed in the environment. To solve the error, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found