Django 错误:无效命令';bdist#u wheel';
在RHEL机器上 我有一些旧的Django项目,我正在迁移到一个新的服务器上,这些项目是为Python2.6、Django1.4.3编写的 我已经安装了python2.7,在我的主目录中创建了virtualenvs,调整了Python版本的路径和引用 我为Python2.7创建了一个virtualenv: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
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
修复了错误消息的问题。。。