0

I am having trouble installing gevent on a Mountain Lion. I actually want to install Deis and gevent is requirement.

When I run pip install gevent I get this log:

/usr/local/bin/pip run on Fri Dec 20 20:59:02 2013
Downloading/unpacking gevent

  Running setup.py egg_info for package gevent

    running egg_info
    writing requirements to pip-egg-info/gevent.egg-info/requires.txt
    writing pip-egg-info/gevent.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/gevent.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/gevent.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found


    reading manifest file 'pip-egg-info/gevent.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/gevent.egg-info/SOURCES.txt'
  Source in /var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent has version 1.0, which satisfies requirement gevent
Requirement already satisfied (use --upgrade to upgrade): greenlet in /usr/local/lib/python2.7/site-packages (from gevent)

Installing collected packages: gevent

  Running setup.py install for gevent

    Running command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-zNHFhT-record/install-record.txt --single-version-externally-managed
    running install
    running build
    running build_py
    running build_ext
    /private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/libev/configure: line 9034: /usr/bin/awk: cannot execute binary file

    LLVM ERROR: IO failure on output stream.

    /private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/libev/configure: line 9094: /usr/bin/awk: cannot execute binary file

    /bin/echo: write: Broken pipe

    ./config.status: line 1212: /usr/bin/awk: cannot execute binary file

    sed: stdout: Broken pipe

    config.status: error: could not create Makefile

    Running '/bin/sh /private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/libev/configure > configure-output.txt' in /private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/build/temp.macosx-10.7-x86_64-2.7/libev

    building 'gevent.core' extension

    /usr/bin/llvm-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I /usr/local/Cellar/libevent/2.0.21/include -L /usr/local/Cellar/libevent/2.0.21/lib -U__llvm__ -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CHECK_ENABLE=0 -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.macosx-10.7-x86_64-2.7/libev -Ilibev -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c gevent/gevent.core.c -o build/temp.macosx-10.7-x86_64-2.7/gevent/gevent.core.o

    In file included from gevent/libev.h:2,

                     from gevent/gevent.core.c:302:

    libev/ev.c:45:22: error: config.h: No such file or directory

    libev/ev.c:467:48: warning: "/*" within comment

    In file included from gevent/libev.h:2,

                     from gevent/gevent.core.c:302:

    libev/ev.c:1311: warning: 'ev_default_loop_ptr' initialized and declared 'extern'

    In file included from gevent/libev.h:2,

                     from gevent/gevent.core.c:302:

    libev/ev.c: In function 'ev_io_start':

    libev/ev.c:3332: warning: suggest parentheses around arithmetic in operand of |

    libev/ev.c:4563:27: warning: "/*" within comment

    libev/ev.c:4564:27: warning: "/*" within comment

    error: command '/usr/bin/llvm-gcc' failed with exit status 1

    Complete output from command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-zNHFhT-record/install-record.txt --single-version-externally-managed:

    running install

running build

running build_py

running build_ext

/private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/libev/configure: line 9034: /usr/bin/awk: cannot execute binary file

LLVM ERROR: IO failure on output stream.

/private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/libev/configure: line 9094: /usr/bin/awk: cannot execute binary file

/bin/echo: write: Broken pipe

./config.status: line 1212: /usr/bin/awk: cannot execute binary file

sed: stdout: Broken pipe

config.status: error: could not create Makefile

Running '/bin/sh /private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/libev/configure > configure-output.txt' in /private/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/build/temp.macosx-10.7-x86_64-2.7/libev

building 'gevent.core' extension

/usr/bin/llvm-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I /usr/local/Cellar/libevent/2.0.21/include -L /usr/local/Cellar/libevent/2.0.21/lib -U__llvm__ -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CHECK_ENABLE=0 -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.macosx-10.7-x86_64-2.7/libev -Ilibev -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c gevent/gevent.core.c -o build/temp.macosx-10.7-x86_64-2.7/gevent/gevent.core.o

In file included from gevent/libev.h:2,

                 from gevent/gevent.core.c:302:

libev/ev.c:45:22: error: config.h: No such file or directory

libev/ev.c:467:48: warning: "/*" within comment

In file included from gevent/libev.h:2,

                 from gevent/gevent.core.c:302:

libev/ev.c:1311: warning: 'ev_default_loop_ptr' initialized and declared 'extern'

In file included from gevent/libev.h:2,

                 from gevent/gevent.core.c:302:

libev/ev.c: In function 'ev_io_start':

libev/ev.c:3332: warning: suggest parentheses around arithmetic in operand of |

libev/ev.c:4563:27: warning: "/*" within comment

libev/ev.c:4564:27: warning: "/*" within comment

error: command '/usr/bin/llvm-gcc' failed with exit status 1

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

Command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-zNHFhT-record/install-record.txt --single-version-externally-managed failed with error code 1 in /var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent

Exception information:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
    status = self.run(options, args)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 261, in run
    requirement_set.install(install_options, global_options)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1166, in install
    requirement.install(install_options, global_options)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 589, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/util.py", line 612, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-zNHFhT-record/install-record.txt --single-version-externally-managed failed with error code 1 in /var/folders/1g/4kj51dlj7z58774p9nlby2c00000gn/T/pip-build/gevent
➜  deis git:(master)

What can be the cause of this error and how can I solve it? There are another way to install gevent?

4

1 回答 1

1

It looks like you have installed Python using Homebrew and something is very wrong with some of your system binaries (or at least with your PATH environment variable).

The best solution is fix the warnings that brew doctor outputs. This will ensure that your brewed pip will work properly (and other brewed things).

I'm on Mountain Lion, using a brewed Python and I just successfully installed Deis using pip install Deis. There were a bunch of compiler warnings, but it seems to have been installed properly.

于 2013-12-20T20:48:57.617 回答