直接運行 pip install gevent 安裝必然會報錯,正確的作法:python
安裝xcodemacos
xcode-select --install
再次運行
pip install gevent安裝成功。xcode
mac126:Desktop mac126$ pip3 install gevent Collecting gevent Using cached https://files.pythonhosted.org/packages/6c/49/681ec1026fe0313d1c6f00a58416f9ade121911f2fd55023e3e7cbd7803f/gevent-1.4.0-cp36-cp36m-macosx_10_6_intel.whl Collecting greenlet>=0.4.14; platform_python_implementation == "CPython" (from gevent) Using cached https://files.pythonhosted.org/packages/f8/e8/b30ae23b45f69aa3f024b46064c0ac8e5fcb4f22ace0dca8d6f9c8bbe5e7/greenlet-0.4.15.tar.gz Installing collected packages: greenlet, gevent Running setup.py install for greenlet ... done Successfully installed gevent-1.4.0 greenlet-0.4.15