error: invalid command 'bdist_wheel'
在RHEL机器上
我有一些旧的Django项目正在迁移到新服务器,这些项目是为Python2.6,Django1.4.3编写的
我已经安装了python2.7,在主目录中创建了virtualenvs,调整了路径并引用了Python版本。
我为Python2.7创建了virtualenv:
1 | virtualenv -p python2.7 ~/.virtualenvs/my_site/ |
当我激活virtualenv然后cd进入网站目录并运行时
成功获取所有库之后,requirements.txt中的每一行都会显示以下错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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(' ', ' ');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和其他站点上发现了许多其他类似的问题,并尝试了修复,但没有运气!
为什么我不能在python中创建轮子?
为什么python setup.py在Travis CI上说无效命令bdist_wheel?
无法建立轮子-错误:无效命令bdist_wheel
我有pip 10.0.1
安装车轮IS(通过
1 2 3 | 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,但是它没有重新安装就可以工作,所以pip可能使用了错误的轮子?
1 | pip uninstall wheel |