[Fixed]-Command "python setup.py egg_info" failed with error code 1

1πŸ‘

  1. Close SIP (system Integrity Protection)
    then reboot, use command +R to enter debug mode, then select terminal:

    csrutil disable
    reboot 
    
  2. Maybe you need to change something according to your mac setting

    sudo
    C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include
    

    pip install scrapy –ignore-installed six

  3. Then remove old six, install it again

    sudo rm -rf /Library/Python/2.7/site-packages/six*
    sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six*
    sudo pip install six
    
  4. Then set it back

    csrutil enable
    reboot
    

    crappy works now

πŸ‘€jimmyzhouj

Leave a comment