1π
-
Close SIP (system Integrity Protection)
then reboot, use command +R to enter debug mode, then select terminal:csrutil disable reboot
-
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
-
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
-
Then set it back
csrutil enable reboot
crappy works now
π€jimmyzhouj
Source:stackexchange.com