无法建立Wheel-错误:无效命令'bdist_wheel' [英] Can't build wheel - error: invalid command 'bdist_wheel'
问题描述
我已经尝试了这个非常相关的问题中的所有内容: 为什么不能在python中创建转轮?
I've tried everything in this very related question: Why can I not create a wheel in python?
但我仍然得到:
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 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). Anyone have ideas of things to check to further the diagnosis here?
确切的命令是:
$ python setup.py bdist_wheel
我也尝试过
$ sudo python setup.py bdist_wheel
我还完成了pip install --upgrade setuptools
和pip install --upgrade wheel
,它们是最新的.
I've also done pip install --upgrade setuptools
and pip install --upgrade wheel
, and they're up-to-date.
推荐答案
我在最近使用python3 -m venv
的Ubuntu上遇到了这种情况(为此您必须
I had this happen to me on a recent Ubuntu using python3 -m venv
(for which you must install python3-venv
), where no matter how many times I cleared the environment and retried, I was getting bdist_wheel
errors installing the dependencies for Flask.
除了默认情况下默认不安装Python 3的venv
之外,出于某些原因,在Ubuntu上,我似乎还必须显式安装wheel
.
In addition to not having venv
by default as normal for a Python 3 install, for some reason on Ubuntu I also seem to have to explicitly install wheel
.
为清楚起见,以下无效:
-
python3 -m venv .
-
. bin/activate
-
pip install Flask
python3 -m venv .
. bin/activate
pip install Flask
但是,以下可行:
-
python3 -m venv .
-
. bin/activate
-
pip install wheel
(例如,不必在Arch Linux上执行此操作) -
pip install Flask
python3 -m venv .
. bin/activate
pip install wheel
(never had to do this on, say, Arch Linux)pip install Flask
这篇关于无法建立Wheel-错误:无效命令'bdist_wheel'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!