Как мне устранить ошибку pip install gevent в Mac OS Mojave?

#python #python-3.x #macos #pip #gevent

#python #python-3.x #macos #pip #gevent

Вопрос:

Я новичок в python. Я открыл существующий проект в Pycharm на Mac OS и получил эту ошибку:

введите описание изображения здесь

 $ brew install pip

Error: No available formula with the name "pip"
pip is part of the python formula:
  brew install python

$ brew install python3

Error: python 3.7.2_1 is already installed
To upgrade to 3.7.2_2, run `brew upgrade python`

$ /usr/local/Cellar/python/3.7.2_1/libexec/bin/pip install gevent==1.2.2

Collecting gevent==1.2.2
  Using cached https://files.pythonhosted.org/packages/1b/92/b111f76e54d2be11375b47b213b56687214f258fd9dae703546d30b837be/gevent-1.2.2.tar.gz
Requirement already satisfied: greenlet>=0.4.10 in /usr/local/lib/python3.7/site-packages (from gevent==1.2.2) (0.4.15)
Building wheels for collected packages: gevent
  Running setup.py bdist_wheel for gevent ... error
  Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-wheel-kfxv6brw --python-tag cp37:
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'cffi_modules'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.13-x86_64-3.7
  creating build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/queue.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/greenlet.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/backdoor.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_semaphore.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/pywsgi.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/event.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/server.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/thread.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_util_py2.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/signal.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_ssl3.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/util.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/builtins.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/local.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/threadpool.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/subprocess.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_socketcommon.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/timeout.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/os.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/core.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_ssl2.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/fileobject.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_fileobjectcommon.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/hub.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_socket2.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/threading.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/win32util.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/resolver_ares.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/baseserver.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_fileobjectposix.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_util.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/lock.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_sslgte279.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_socket3.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/monkey.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/select.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_compat.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_threading.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/ssl.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/socket.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/pool.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/resolver_thread.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/wsgi.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/_tblib.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
  creating build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/_corecffi_build.py -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/corecffi.py -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  running egg_info
  writing src/gevent.egg-info/PKG-INFO
  writing dependency_links to src/gevent.egg-info/dependency_links.txt
  writing requirements to src/gevent.egg-info/requires.txt
  writing top-level names to src/gevent.egg-info/top_level.txt
  reading manifest file 'src/gevent.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'changelog.rst'
  warning: no files found matching 'known_failures.py'
  warning: no files found matching '.pep8'
  no previously-included directories found matching '*/__pycache__'
  warning: no previously-included files matching '*.so' found anywhere in distribution
  warning: no previously-included files matching '*.o' found anywhere in distribution
  warning: no previously-included files matching '*.lo' found anywhere in distribution
  warning: no previously-included files matching '*.la' found anywhere in distribution
  warning: no previously-included files matching 'config.log' found anywhere in distribution
  warning: no previously-included files matching 'config.status' found anywhere in distribution
  no previously-included directories found matching 'doc/_build'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '.coverage' found under directory 'src/greentest'
  no previously-included directories found matching 'src/greentest/htmlcov'
  warning: no previously-included files matching 'stamp-h?' found under directory 'deps/c-ares'
  warning: no previously-included files matching 'ares_build.h.orig' found under directory 'deps/c-ares'
  no previously-included directories found matching 'deps/libev/.deps'
  warning: no previously-included files matching 'Makefile' found under directory 'deps/libev'
  warning: no previously-included files matching 'libtool' found under directory 'deps/libev'
  warning: no previously-included files matching 'stamp-h?' found under directory 'deps/libev'
  warning: no previously-included files matching 'config.h' found under directory 'deps/libev'
  warning: no previously-included files matching '_corecffi.c' found under directory 'src/gevent'
  warning: no previously-included files found matching 'Makefile'
  warning: no previously-included files found matching 'configure-output'
  writing manifest file 'src/gevent.egg-info/SOURCES.txt'
  copying src/gevent/_semaphore.pxd -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/ares.pyx -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/cares.pxd -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/cares_ntop.h -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/cares_pton.h -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/dnshelper.c -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/gevent._semaphore.c -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/gevent.ares.c -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/gevent.ares.h -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/python.pxd -> build/lib.macosx-10.13-x86_64-3.7/gevent
  copying src/gevent/libev/_corecffi_cdef.c -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/_corecffi_source.c -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/callbacks.c -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/callbacks.h -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/corecext.ppyx -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/corecext.pyx -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/gevent.corecext.c -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/libev.h -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/libev.pxd -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/libev_vfd.h -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  copying src/gevent/libev/stathelper.c -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
  running build_ext
  Running '(cd  "/private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev"  amp;amp; sh ./configure   amp;amp; cp config.h "$OLDPWD" ) > configure-output.txt' in /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/build/temp.macosx-10.13-x86_64-3.7/libev
  building 'gevent.libev.corecext' extension
  creating build/temp.macosx-10.13-x86_64-3.7/src
  creating build/temp.macosx-10.13-x86_64-3.7/src/gevent
  creating build/temp.macosx-10.13-x86_64-3.7/src/gevent/libev
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -U__llvm__ -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.macosx-10.13-x86_64-3.7/libev -I/private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/gevent/libev/gevent.corecext.c -o build/temp.macosx-10.13-x86_64-3.7/src/gevent/libev/gevent.corecext.o
  In file included from src/gevent/libev/gevent.corecext.c:434:
  In file included from src/gevent/libev/libev.h:2:
  /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev/ev.c:483:48: warning: '/*' within block comment [-Wcomment]
  /*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */
                                                 ^
  /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev/ev.c:1269:13: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
        if (e < (14 - 24)) /* might not be sharp, but is good enough */
            ~ ^  ~~~~~~~
  /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev/ev.c:1831:31: warning: 'extern' variable has an initializer [-Wextern-initializer]
    EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */
                                ^
  /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev/ev.c:1940:19: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
    if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4)
        ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev/ev.c:3878:34: warning: 'amp;' within '|' [-Wbitwise-op-parentheses]
    fd_change (EV_A_ fd, w->events amp; EV__IOFDSET | EV_ANFD_REIFY);
                         ~~~~~~~~~~^~~~~~~~~~~~~ ~
  /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/deps/libev/ev.c:3878:34: note: place parentheses around the 'amp;' expression to silence this warning
    fd_change (EV_A_ fd, w->events amp; EV__IOFDSET | EV_ANFD_REIFY);
                                   ^
                         (                      )
  src/gevent/libev/gevent.corecext.c:3314:104: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
    __pyx_t_1 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 0); if (unlikely(__pyx_t_1 == -1 amp;amp; PyErr_Occurred())) __PYX_ERR(0, 168, __pyx_L1_error)
                                                                                               ~~~~~~~~~ ^  ~~
  src/gevent/libev/gevent.corecext.c:614:43: note: expanded from macro 'unlikely'
    #define unlikely(x) __builtin_expect(!!(x), 0)
                                            ^
  src/gevent/libev/gevent.corecext.c:4092:106: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
      __pyx_t_2 = __pyx_f_6gevent_5libev_8corecext__flags_to_int(__pyx_v_flags, 0); if (unlikely(__pyx_t_2 == -1 amp;amp; PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error)
                                                                                                 ~~~~~~~~~ ^  ~~
  src/gevent/libev/gevent.corecext.c:614:43: note: expanded from macro 'unlikely'
    #define unlikely(x) __builtin_expect(!!(x), 0)
                                            ^
  src/gevent/libev/gevent.corecext.c:30323:65: error: too many arguments to function call, expected 3, have 4
      return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                     ^~~~
  /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/stddef.h:105:16: note: expanded from macro 'NULL'
  #  define NULL ((void*)0)
                 ^~~~~~~~~~
  src/gevent/libev/gevent.corecext.c:30535:21: error: no member named 'exc_type' in 'struct _ts'
      *type = tstate->exc_type;
              ~~~~~~  ^
  src/gevent/libev/gevent.corecext.c:30536:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      *value = tstate->exc_value;
                       ^~~~~~~~~
                       curexc_value
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  src/gevent/libev/gevent.corecext.c:30537:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      *tb = tstate->exc_traceback;
                    ^~~~~~~~~~~~~
                    curexc_traceback
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  src/gevent/libev/gevent.corecext.c:30544:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  src/gevent/libev/gevent.corecext.c:30545:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  src/gevent/libev/gevent.corecext.c:30546:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  src/gevent/libev/gevent.corecext.c:30547:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = type;
      ~~~~~~  ^
  src/gevent/libev/gevent.corecext.c:30548:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = value;
              ^~~~~~~~~
              curexc_value
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  src/gevent/libev/gevent.corecext.c:30549:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  src/gevent/libev/gevent.corecext.c:30604:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  src/gevent/libev/gevent.corecext.c:30605:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  src/gevent/libev/gevent.corecext.c:30606:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  src/gevent/libev/gevent.corecext.c:30607:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = local_type;
      ~~~~~~  ^
  src/gevent/libev/gevent.corecext.c:30608:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = local_value;
              ^~~~~~~~~
              curexc_value
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  src/gevent/libev/gevent.corecext.c:30609:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = local_tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  src/gevent/libev/gevent.corecext.c:31158:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  src/gevent/libev/gevent.corecext.c:31159:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  src/gevent/libev/gevent.corecext.c:31160:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  7 warnings and 20 errors generated.
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for gevent
  Running setup.py clean for gevent
Failed to build gevent
Installing collected packages: gevent
  Running setup.py install for gevent ... error
    Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-install-2sumork0/gevent/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/0f/bp0p28fn5n9bwtg6wt7bs8nm0000gn/T/pip-record-rdykn6v0/install-record.txt --single-version-externally-managed --compile:
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'cffi_modules'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.13-x86_64-3.7
    creating build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/queue.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/greenlet.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/backdoor.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_semaphore.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/pywsgi.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/event.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/server.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/thread.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_util_py2.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/signal.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_ssl3.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/util.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/builtins.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/local.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/threadpool.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/subprocess.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_socketcommon.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/timeout.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/os.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/core.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_ssl2.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/fileobject.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_fileobjectcommon.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/hub.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_socket2.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/threading.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/win32util.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/resolver_ares.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/baseserver.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_fileobjectposix.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_util.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/lock.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_sslgte279.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_socket3.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/monkey.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/select.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_compat.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_threading.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/ssl.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/socket.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/pool.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/resolver_thread.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/wsgi.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    copying src/gevent/_tblib.py -> build/lib.macosx-10.13-x86_64-3.7/gevent
    creating build/lib.macosx-10.13-x86_64-3.7/gevent/libev
    copying src/gevent/libev/_corecffi_build.py -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
    copying src/gevent/libev/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
    copying src/gevent/libev/corecffi.py -> build/lib.macosx-10.13-x86_64-3.7/gevent/libev
    running egg_info
    writing src/gevent.egg-info/PKG-INFO
    writing dependency_links to src/gevent.egg-info/dependency_links.txt
    writing requirements to src/gevent.egg-info/requires.txt
    writing top-level names to src/gevent.egg-info/top_level.txt
    reading manifest file 'src/gevent.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'changelog.rst'
    warning: no files found matching 'known_failures.py'
    warning: no files found matching '.pep8'
    no previously-included directories found matching '*/__pycache__'
    warning: no previously-included files matching '*.so' found anywhere in distribution
    warning: no previously-included files matching '*.o' found anywhere in distribution
    warning: no previously-included files matching '*.lo' found anywhere in distribution
    warning: no previously-included files matching '*.la' found anywhere in distribution
    no previously-included directories found matching 'doc/_build'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '.coverage' found under directory 'src/greentest'
    no previously-included directories found matching 'src/greentest/htmlcov'
    warning: no previously-included files matching 'stamp-h?' found under directory 'deps/c-ares'
    warning: no previously-included files matching 'ares_build.h.orig' found under directory 'deps/c-ares'
    warning: no previously-included files matching '_corecffi.c' found under directory 'src/gevent'
    warning: no previously-included files found matching 'Makefile'
    warning: no previously-included files found matching 'configure-output'

...
  

https://pastebin.com/LF76EK2N

Похоже, что на моем Mac установлены python2 и python3:

 $ /usr/bin/python --version

Python 2.7.10

$ /usr/local/Cellar/python/3.7.2_1/libexec/bin/python --version

Python 3.7.2
  

Комментарии:

1. gevent==1.2.2 Почему вы используете такую старую версию? Текущая версия 1.4.0.

2. Я использую примеры приложений, которые находятся в выпуске istio-1.0.5. Просто пытаюсь запустить приложения. Я не писал этот код. Это с открытым исходным кодом.

3. Также я большой поклонник использования miniconda для python. Делает все это намного проще.

Ответ №1:

Ошибка «нет элемента с именем ‘exc_type’ в ‘struct _ts'» исходит из Python 3.7. Вы пытаетесь установить довольно старую версию gevent (1.2.2), которая не поддерживает Python 3.7. Используйте Python 3.4, 3.5 или 3.6. Даже последняя версия gevent (в настоящее время 1.4.0) пока не поддерживает Python 3.7.