麻烦在Python虚拟环境中安装zerorpc(Pycharm)

时间:2015-11-29 19:30:48

标签: python python-3.x pycharm

我试图在Pycharm虚拟环境中为Python 3.5,32位安装zerorpc。

我收到此错误...

"TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'"

这似乎与"失败的gevent构建轮有关。"。

我已尝试通过终端安装。没有运气。

我正在运行OSX 10.9.5。

这是完整的错误:

    Collecting zerorpc
Collecting gevent>=1.0 (from zerorpc)
  Using cached gevent-1.0.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): msgpack-python in /Users/user/python3.5-32/lib/python3.5/site-packages (from zerorpc)
Requirement already satisfied (use --upgrade to upgrade): pyzmq>=13.1.0 in /Users/user/python3.5-32/lib/python3.5/site-packages (from zerorpc)
Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.4.7 in /Users/user/python3.5-32/lib/python3.5/site-packages (from gevent>=1.0->zerorpc)
Building wheels for collected packages: gevent
  Running setup.py bdist_wheel for gevent
  Complete output from command /Users/user/python3.5-32/bin/python -c "import setuptools;__file__='/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/tmp736o13ulpip-wheel-:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.6-intel-3.5
  creating build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/__init__.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/_ssl2.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/_sslgte279.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/_threading.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/backdoor.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/baseserver.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/coros.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/event.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/fileobject.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/greenlet.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/hub.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/local.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/lock.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/monkey.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/os.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/pool.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/pywsgi.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/queue.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/resolver_ares.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/resolver_thread.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/select.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/server.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/socket.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/ssl.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/subprocess.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/thread.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/threading.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/threadpool.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/timeout.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/util.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/win32util.py -> build/lib.macosx-10.6-intel-3.5/gevent
  copying gevent/wsgi.py -> build/lib.macosx-10.6-intel-3.5/gevent
  warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  Running '/bin/sh /private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/libev/configure > configure-output.txt' in /private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/build/temp.macosx-10.6-intel-3.5/libev
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 317, in <module>
      run_setup(ext_modules)
    File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 312, in run_setup
      "Development Status :: 4 - Beta"])
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/Users/user/python3.5-32/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 175, in run
      self.run_command('build')
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 338, in run
      self.build_extensions()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
      self._build_extensions_serial()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
      self.build_extension(ext)
    File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 234, in build_extension
      self.gevent_prepare(ext)
    File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 231, in gevent_prepare
      configure(self, ext)
    File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 139, in configure_libev
      make_universal_header('config.h', 'SIZEOF_LONG', 'SIZEOF_SIZE_T', 'SIZEOF_TIME_T')
    File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 111, in make_universal_header
      print >>f, line
  TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'

  ----------------------------------------
Failed to build gevent
Installing collected packages: gevent, zerorpc
  Running setup.py install for gevent
    Complete output from command /Users/user/python3.5-32/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pip-cegvl51k-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/user/python3.5-32/bin/../include/site/python3.5/gevent:
    running install
    running build
    running build_py
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building 'gevent.core' extension
    creating build/temp.macosx-10.6-intel-3.5/gevent
    /usr/bin/clang -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.6-intel-3.5/libev -Ilibev -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c gevent/gevent.core.c -o build/temp.macosx-10.6-intel-3.5/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: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);                                     \
                         ^
    libev/ev.c:1390:1: warning: 'static' function 'ev_floor' declared in header file should be declared 'static inline' [-Wunneeded-internal-declaration]
    ev_floor (ev_tstamp v)
    ^
    gevent/gevent.core.c:44930:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
    static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
                                   ^
    gevent/gevent.core.c:45045:33: warning: unused function '__Pyx_PyIndex_AsSsize_t' [-Wunused-function]
    static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
                                    ^
    gevent/gevent.core.c:43360:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                   ^
    gevent/gevent.core.c:43374:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                   ^
    19 warnings generated.
    /usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -U__llvm__ build/temp.macosx-10.6-intel-3.5/gevent/gevent.core.o -o build/lib.macosx-10.6-intel-3.5/gevent/core.cpython-35m-darwin.so
    ld: warning: ignoring file build/temp.macosx-10.6-intel-3.5/gevent/gevent.core.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.5/gevent/gevent.core.o
    Linking /private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/build/lib.macosx-10.6-intel-3.5/gevent/core.cpython-35m-darwin.so to /private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/gevent/core.cpython-35m-darwin.so
    Running '/bin/sh /private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/c-ares/configure CONFIG_COMMANDS= CONFIG_FILES= > configure-output.txt' in /private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/build/temp.macosx-10.6-intel-3.5/c-ares
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 317, in <module>
        run_setup(ext_modules)
      File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 312, in run_setup
        "Development Status :: 4 - Beta"])
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/Users/user/python3.5-32/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/install.py", line 539, in run
        self.run_command('build')
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 338, in run
        self.build_extensions()
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
        self._build_extensions_serial()
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
        self.build_extension(ext)
      File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 234, in build_extension
        self.gevent_prepare(ext)
      File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 231, in gevent_prepare
        configure(self, ext)
      File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 162, in configure_ares
        make_universal_header('ares_build.h', 'CARES_SIZEOF_LONG')
      File "/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py", line 111, in make_universal_header
        print >>f, line
    TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'

    ----------------------------------------

  Failed building wheel for gevent
Command "/Users/user/python3.5-32/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pip-cegvl51k-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/user/python3.5-32/bin/../include/site/python3.5/gevent" failed with error code 1 in /private/var/folders/t4/xp7tp60132xfvpcsglylyyjr0000gn/T/pycharm-packaging0.tmp/gevent

更新:最终有效的是首先在此处安装了gevent的alpha版本:https://pypi.python.org/pypi/gevent/1.1a1

0 个答案:

没有答案