python - gevent 无法在 OS X Capitan 上的 python 虚拟环境中安装

标签 python macos python-2.7 gcc gevent

我刚刚安装了 OS X Capitan 并尝试在 python2.7.x 虚拟环境中安装 gevent。这就是我得到的。看起来像与 gcc 有关的东西。这是回溯:

  Building wheels for collected packages: gevent
  Running setup.py bdist_wheel for gevent
  Complete output from command /Users/admin/pyenvs/plgrnd/bin/python -c "import setuptools;__file__='/private/var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-build-KkzbuJ/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/tmpxRMK02pip-wheel-:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.5-x86_64-2.7
  creating build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/__init__.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/_ssl2.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/_sslgte279.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/_threading.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/backdoor.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/baseserver.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/coros.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/event.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/fileobject.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/greenlet.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/hub.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/local.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/lock.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/monkey.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/os.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/pool.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/pywsgi.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/queue.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/resolver_ares.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/resolver_thread.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/select.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/server.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/socket.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/ssl.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/subprocess.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/thread.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/threading.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/threadpool.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/timeout.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/util.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/win32util.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  copying gevent/wsgi.py -> build/lib.macosx-10.5-x86_64-2.7/gevent
  running build_ext
  Running '/bin/sh /private/var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-build-KkzbuJ/gevent/libev/configure > configure-output.txt' in /private/var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-build-KkzbuJ/gevent/build/temp.macosx-10.5-x86_64-2.7/libev
  building 'gevent.core' extension
  creating build/temp.macosx-10.5-x86_64-2.7/gevent
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U__llvm__ -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.macosx-10.5-x86_64-2.7/libev -Ilibev -I/Users/admin/anaconda/include/python2.7 -c gevent/gevent.core.c -o build/temp.macosx-10.5-x86_64-2.7/gevent/gevent.core.o
  In file included from gevent/gevent.core.c:249:
  In file included from gevent/libev.h:2:
  libev/ev.c:483:48: warning: '/*' within block comment [-Wcomment]
  /*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */
                                                 ^
  libev/ev.c:1029:42: error: '_Noreturn' keyword must precede function declarator
    ecb_inline void ecb_unreachable (void) ecb_noreturn;
                                           ^~~~~~~~~~~~
    _Noreturn
  libev/ev.c:832:26: note: expanded from macro 'ecb_noreturn'
    #define ecb_noreturn   _Noreturn
                           ^
  libev/ev.c:1625: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 */
                                ^
  libev/ev.c:1796:7: warning: unused variable 'ocur_' [-Wunused-variable]
        array_needsize (ANPENDING, pendings [pri], pendingmax [pri], w_->pending, EMPTY2);
        ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:1807:3: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (W, rfeeds, rfeedmax, rfeedcnt + 1, EMPTY2);
    ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:1934:7: warning: unused variable 'ocur_' [-Wunused-variable]
        array_needsize (int, fdchanges, fdchangemax, fdchangecnt, EMPTY2);
        ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  In file included from gevent/gevent.core.c:249:
  In file included from gevent/libev.h:2:
  In file included from libev/ev.c:2484:
  libev/ev_kqueue.c:50:3: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2);
    ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  In file included from gevent/gevent.core.c:249:
  In file included from gevent/libev.h:2:
  In file included from libev/ev.c:2490:
  libev/ev_poll.c:66:7: warning: unused variable 'ocur_' [-Wunused-variable]
        array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2);
        ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:3648:34: warning: '&' within '|' [-Wbitwise-op-parentheses]
    fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
                         ~~~~~~~~~~^~~~~~~~~~~~~ ~
  libev/ev.c:3648:34: note: place parentheses around the '&' expression to silence this warning
    fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
                                   ^
                         (                      )
  libev/ev.c:3687:3: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (ANHE, timers, timermax, ev_active (w) + 1, EMPTY2);
    ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:4367:5: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ev_idle *, idles [ABSPRI (w)], idlemax [ABSPRI (w)], active, EMPTY2);
      ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:4407:3: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (ev_prepare *, prepares, preparemax, preparecnt, EMPTY2);
    ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:4445:3: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (ev_check *, checks, checkmax, checkcnt, EMPTY2);
    ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:4592:3: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (ev_fork *, forks, forkmax, forkcnt, EMPTY2);
    ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  libev/ev.c:4675:3: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (ev_async *, asyncs, asyncmax, asynccnt, EMPTY2);
    ^
  libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
        int ecb_unused ocur_ = (cur);                                     \
                       ^
  14 warnings and 1 error generated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for gevent
Failed to build gevent
Installing collected packages: gevent, futures, trollius, aiogevent, colorama, jmespath, six, python-dateutil, docutils, botocore, pyasn1, rsa, awscli, boto, coverage, ijson, linecache2, pep8, pip2pi, protobuf, PyMySQL, PyYAML, requests, requests-futures, argparse, snakebite, SQLAlchemy, testfixtures, traceback2, unittest2, wheel
  Running setup.py install for gevent
    Complete output from command /Users/admin/pyenvs/plgrnd/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-build-KkzbuJ/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-_tF1FW-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/admin/pyenvs/plgrnd/include/site/python2.7/gevent:
    running install
    running build
    running build_py
    running build_ext
    building 'gevent.core' extension
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U__llvm__ -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.macosx-10.5-x86_64-2.7/libev -Ilibev -I/Users/admin/anaconda/include/python2.7 -c gevent/gevent.core.c -o build/temp.macosx-10.5-x86_64-2.7/gevent/gevent.core.o
    In file included from gevent/gevent.core.c:249:
    In file included from gevent/libev.h:2:
    libev/ev.c:483:48: warning: '/*' within block comment [-Wcomment]
    /*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */
                                                   ^
    libev/ev.c:1029:42: error: '_Noreturn' keyword must precede function declarator
      ecb_inline void ecb_unreachable (void) ecb_noreturn;
                                             ^~~~~~~~~~~~
      _Noreturn
    libev/ev.c:832:26: note: expanded from macro 'ecb_noreturn'
      #define ecb_noreturn   _Noreturn
                             ^
    libev/ev.c:1625: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 */
                                  ^
    libev/ev.c:1796:7: warning: unused variable 'ocur_' [-Wunused-variable]
          array_needsize (ANPENDING, pendings [pri], pendingmax [pri], w_->pending, EMPTY2);
          ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:1807:3: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (W, rfeeds, rfeedmax, rfeedcnt + 1, EMPTY2);
      ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:1934:7: warning: unused variable 'ocur_' [-Wunused-variable]
          array_needsize (int, fdchanges, fdchangemax, fdchangecnt, EMPTY2);
          ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    In file included from gevent/gevent.core.c:249:
    In file included from gevent/libev.h:2:
    In file included from libev/ev.c:2484:
    libev/ev_kqueue.c:50:3: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2);
      ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    In file included from gevent/gevent.core.c:249:
    In file included from gevent/libev.h:2:
    In file included from libev/ev.c:2490:
    libev/ev_poll.c:66:7: warning: unused variable 'ocur_' [-Wunused-variable]
          array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2);
          ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:3648:34: warning: '&' within '|' [-Wbitwise-op-parentheses]
      fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
                           ~~~~~~~~~~^~~~~~~~~~~~~ ~
    libev/ev.c:3648:34: note: place parentheses around the '&' expression to silence this warning
      fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
                                     ^
                           (                      )
    libev/ev.c:3687:3: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ANHE, timers, timermax, ev_active (w) + 1, EMPTY2);
      ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:4367:5: warning: unused variable 'ocur_' [-Wunused-variable]
        array_needsize (ev_idle *, idles [ABSPRI (w)], idlemax [ABSPRI (w)], active, EMPTY2);
        ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:4407:3: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ev_prepare *, prepares, preparemax, preparecnt, EMPTY2);
      ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:4445:3: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ev_check *, checks, checkmax, checkcnt, EMPTY2);
      ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:4592:3: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ev_fork *, forks, forkmax, forkcnt, EMPTY2);
      ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    libev/ev.c:4675:3: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ev_async *, asyncs, asyncmax, asynccnt, EMPTY2);
      ^
    libev/ev.c:1758:22: note: expanded from macro 'array_needsize'
          int ecb_unused ocur_ = (cur);                                     \
                         ^
    14 warnings and 1 error generated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/Users/admin/pyenvs/plgrnd/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-build-KkzbuJ/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-_tF1FW-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/admin/pyenvs/plgrnd/include/site/python2.7/gevent" failed with error code 1 in /private/var/folders/m8/xt5420594cn8zbgnry594ljw0000gn/T/pip-build-KkzbuJ/gevent

非常感谢任何帮助。

最佳答案

关于python - gevent 无法在 OS X Capitan 上的 python 虚拟环境中安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33040029/

相关文章:

python - 如何在工作簿中定位图表

python - 在 Python 中使用代理命令连接到 SFTP 客户端

python - 对 Google Geocoding API 的普通 HTTP API 调用因 Python 请求模块而失败

python - 如何找到拟合指数函数的 x ?

linux - 用于 GCC/G++ 的宏来区分 Linux 和 Mac OSX?

python - 如何在python中自动解析 bool 格式的conf文件中的配置选项?

javascript - 如何在 Python 中抓取包含动态内容(由 JavaScript 创建)的页面?

c - mac 操作系统 x 10.6 : syslog() EXC_BAD_ACCESS

c++ - osx 上的 apache ignite 2.0 c++ 无法编译

python - Python非守护线程是非分离线程吗?它的资源什么时候被释放?