lektor: Ubuntu 20.04 "error: invalid command 'bdist_wheel'"
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.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18 (11 by maintainers)
@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)
I’m updating this topic to point that the best install method at the moment is using pipx:
Close and reopen terminal
I’ll close this issue with this and point out 3 things, 2 and 3 are derived from 1:
For further discussion please go to #915
Update:
--prefer-binarywon’t do anything, there are no binaries to get.This seems to me entirely very silly. The issue here is that those packages don’t have wheels pre-built for py3 (see https://pypi.org/simple/exifread/ , https://pypi.org/simple/inifile/ etc.) and that pip tries to build a wheel locally, regardless. And funnily enough, there is in fact no issue, since everything just works.
I personally consider this a pip bug, but I’m not willing to pursue that stance. 😃 This issue here seems repeated for many projects, and consistently people propose
pip install wheel, and nobody bothers to ask “but why?”.Well, “there’s nothing to fix” but it saves us some tilting at windmills, so ok.