python 错误 error: invalid command 'egg_info'

Processing /bs4-0.0.1/setuptools-38.4.0/numpy-1.14.0
    Complete output from command python setup.py egg_info:
    Running from numpy source directory.
    /python2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    /python2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
      warnings.warn(msg)
    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 'egg_info'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-NKQDvv-build/

执行 pip install --upgrade pip setuptools

原文地址:https://www.cnblogs.com/cainiaoit/p/8376773.html