gpt4 book ai didi

python - 如何修复 `error: invalid command ' bdist_wheel'`?

转载 作者:行者123 更新时间:2023-12-04 04:25:03 25 4
gpt4 key购买 nike

我尝试在 Ubuntu 20.04.01 上安装 watchman:

guettli@yoga15:~/tmp$ python3 -m venv pywatchman-test
guettli@yoga15:~/tmp$ cd pywatchman-test
guettli@yoga15:~/tmp/pywatchman-test$ . bin/activate

(pywatchman-test) guettli@yoga15:~/tmp/pywatchman-test$ pip install pywatchman
失败:
Collecting pywatchman
Using cached pywatchman-1.4.1.tar.gz (29 kB)
Building wheels for collected packages: pywatchman
Building wheel for pywatchman (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/guettli/tmp/pywatchman-test/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-on_zbadt/pywatchman/setup.py'"'"'; __file__='"'"'/tmp/pip-install-on_zbadt/pywatchman/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-9np2rv_b
cwd: /tmp/pip-install-on_zbadt/pywatchman/
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 pywatchman
Running setup.py clean for pywatchman
Failed to build pywatchman
Installing collected packages: pywatchman
Running setup.py install for pywatchman ... done
Successfully installed pywatchman-1.4.1
我找到了解决这个问题的方法:如果我卸载 pywatchman并安装 wheel它工作正常。
我想为守望者创建一个补丁,这样就可以立即使用。
怎么解决,以后不会再出现这种情况了?
相关: https://github.com/facebook/watchman/issues/876

最佳答案

运行

pip install wheel
或者
pip3 install wheel
为我解决了这个问题

关于python - 如何修复 `error: invalid command ' bdist_wheel'`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65273035/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com