错误:无效命令'bdist_wheel'

问题描述 投票:1回答:1

在RHEL机器上

我有一些旧的Django项目,我正在转移到一个新的服务器,这些是为Python2.6编写的,Django1.4.3

我已经安装了python2.7,在我的主目录中创建了virtualenvs,调整了路径并引用了Python版本。

我为Python2.7创建了一个virtualenv:

virtualenv -p python2.7 ~/.virtualenvs/my_site/

当我激活virtualenv然后cd进入网站目录并运行

pip install -r requirements.txt

成功获取所有库后,requirements.txt中的每一行都会显示以下错误:

Building wheels for collected packages: MySQL-python, Pillow...etc

Running setup.py bdist_wheel for MySQL-python ... error
Complete output from command /home/my_user/.virtualenvs/my_site/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-96k9a4/MySQL-python/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-ngSbQU --python-tag cp27:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

我在stackexchange和其他网站上发现了许多其他类似的问题,并尝试了修复但没有运气!

Why can I not create a wheel in python?

Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI?

Can't build wheel - error: invalid command 'bdist_wheel'

我有点10.0.1

wheel安装了(通过pip install wheel),我还在我的虚拟环境中运行以下命令:

pip install --upgrade pip ('Requirement already up-to-date')
pip install setuptools --upgrade ('Requirement already up-to-date')
python setup.py bdist_wheel ('error: invalid command 'bdist_wheel'')

我还能看到什么来解决这个问题?

django python-2.7 python-wheel
1个回答
0
投票

不知道为什么,但卸载轮固定它

我卸载了轮子以重新安装它,但它没有重新安装,所以也许pip使用了错误的轮子?

pip uninstall wheel
© www.soinside.com 2019 - 2024. All rights reserved.