【问题标题】:Django: error: invalid command 'bdist_wheel'Django:错误:无效命令“bdist_wheel”
【发布时间】:2023-03-05 01:39:01
【问题描述】:

我已经安装了这些包,但是遇到了traceback,它显示了error: invalid command 'bdist_wheel'

我引用了Why can I not create a wheel in python?

wheel ,setuptools --force, --upgrade pip 已全部更新和安装。

所以我很困惑为什么它仍然出错。

[192.168.15.xxx] out:   Running setup.py bdist_wheel for bokeh ... [?25lerror

[192.168.15.xxx] out:   Complete output from command /home/user/project/weather_station/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-25c2v483/bokeh/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpn5f73qcnpip-wheel- --python-tag cp35:

[192.168.15.xxx] out:

[192.168.15.xxx] out:

[192.168.15.xxx] out:   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

[192.168.15.xxx] out:      or: -c --help [cmd1 cmd2 ...]

[192.168.15.xxx] out:      or: -c --help-commands

[192.168.15.xxx] out:      or: -c cmd --help

[192.168.15.xxx] out:

[192.168.15.] out:   error: invalid command 'bdist_wheel'

【问题讨论】:

  • 这个错误的任何解决办法???
  • 你安装wheel了吗?

标签: python django


【解决方案1】:

以防万一,确保您在 setupy.py 中的导入正确:

from setuptools import setup

我在 pycharm 自动创建的 setup.py 中遇到了同样的错误,它创建了以下 WRONG 导入语句:

from distutils.core import setup

因此,请确保您正在导入正确的 setup 模块。

【讨论】:

    猜你喜欢
    • 2018-12-07
    • 1970-01-01
    • 2021-03-24
    • 2016-08-29
    • 2022-01-24
    • 2017-10-04
    • 2016-04-21
    • 2013-08-29
    相关资源
    最近更新 更多