pip安装gevent mountain lion失败

2024-04-28 21:15:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我在狮子山上安装了一个通风口。我实际上想安装Deis和gevent。在

当我运行pip install gevent时,我会得到以下日志:

/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)

这个错误的原因是什么?我如何解决它?还有其他方法可以安装gevent?在


Tags: installpipbuildinfobineggvarusr
1条回答
网友
1楼 · 发布于 2024-04-28 21:15:48

看起来您使用Homebrew安装了Python,并且您的一些系统二进制文件(或者至少是您的PATH环境变量)出现了一些非常错误的情况。在

最好的解决方案是修复brew doctor输出的警告。这将确保您酿造的pip能够正常工作(以及其他酿造的东西)。在

我在狮子山上,用的是一条酿制的Python,我刚刚用pip install Deis成功地安装了Deis。有一堆编译器警告,但似乎已正确安装。在

相关问题 更多 >