Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django 错误:无效命令';bdist#u wheel';_Django_Python 2.7_Python Wheel - Fatal编程技术网

Django 错误:无效命令';bdist#u wheel';

Django 错误:无效命令';bdist#u wheel';,django,python-2.7,python-wheel,Django,Python 2.7,Python Wheel,在RHEL机器上 我有一些旧的Django项目,我正在迁移到一个新的服务器上,这些项目是为Python2.6、Django1.4.3编写的 我已经安装了python2.7,在我的主目录中创建了virtualenvs,调整了Python版本的路径和引用 我为Python2.7创建了一个virtualenv: virtualenv -p python2.7 ~/.virtualenvs/my_site/ 当我激活virtualenv,然后将cd放入网站目录并运行 pip安装-r requireme

在RHEL机器上

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

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

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

virtualenv -p python2.7 ~/.virtualenvs/my_site/
当我激活virtualenv,然后将cd放入网站目录并运行

pip安装-r requirements.txt

成功获取所有LIB后,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和其他网站上发现了许多其他类似的问题,并尝试了修复,但没有成功

我有PIP10.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'')

我还可以看什么来修复此问题?

不确定原因,但卸载wheel可以修复此问题

我卸载了wheel以重新安装它,但它没有重新安装就工作了

pip uninstall wheel

您好,我已经用更多的信息更新了问题,谢谢。您确定您正在使用虚拟环境中的
pip
?您可以使用
哪个pip
进行检查。您可以使用
python-mpip
而不是
pip
,以确保对
python
使用正确的
pip
“哪个pip”返回虚拟环境的pip路径。”python2.7-m pip install-r requirements.txt'中有bdist_wheel错误,我认为这不会有什么帮助,但最后一个想法是,您可以尝试使用
python-m pip
安装wheel,升级pip等。如果您激活了virtualenv,我只会使用
python
而不是
python2.7
“需求已经是最新的”,对于我来说,不幸的是,
pip install wheel
修复了错误消息的问题。。。