Python pip – error: invalid command ‘bdist_wheel’


原文@http://software-engineer.gatsbylee.com/python-pip-error-invalid-command-bdist_wheel/

Python pip – error: invalid command ‘bdist_wheel’

环境

  • python-setuptools 0.6.10 from CentOS 6 Base
  • pip 7.1.0 from https://bootstrap.pypa.io/get-pip.py
  • python 2.6

问题?

When I install python modules, such ans Flask, SQLAlchemy, etc., I got this error “error: invalid command ‘bdist_wheel'”.

原因?

This is compatibility issue between pip and setuptools.

The python-setuptool 0.6.10 from CentOS 6 uses python module, setuptools.

from setuptools import setup

However, the pip 7.1.0 expects that the installed python setuptool module use distutils.core.

from distutils.core import setup

 解决方案?

There could be two approaches.

1. using the pip packages from CentOS 6 which is 1.3.1.

$ python -m pip uninstall pip setuptools
$ yum install python-pip python-setuptools

2. upgrading python setuptool module

$pip install setuptools --upgrade


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM