我已经尝试了这个非常相关的问题中的所有内容:为什么我无法在 python 中创建轮子? https://stackoverflow.com/questions/26664102/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'
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)
所以看起来一切都已安装并且版本看起来不错(我认为)。有人有什么想法可以检查以进一步诊断吗?
确切的命令是:
$ python setup.py bdist_wheel
我也尝试过
$ sudo python setup.py bdist_wheel
我也做过pip install --upgrade setuptools
and pip install --upgrade wheel
,并且它们是最新的。
我最近在使用 Ubuntu 时遇到过这种情况python3 -m venv
(为此你必须install python3-venv https://superuser.com/a/1039426/270021),无论我清理环境并重试多少次,我都会得到bdist_wheel
安装 Flask 依赖项时出错。
除了没有venv
默认情况下,Python 3 安装正常,出于某种原因,在 Ubuntu 上我似乎也必须显式安装wheel
.
为了清楚起见,以下不工作:
python3 -m venv .
. bin/activate
pip install Flask
然而,以下确实有效:
python3 -m venv .
. bin/activate
-
pip install wheel
(从来没有必要在 Arch Linux 上这样做)
pip install Flask
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)