无法在Mac OS X 10.12.16

时间:2017-09-25 13:22:14

标签: python macos gevent

我无法在带有

的virtualenv中安装gevent

CFLAGS='-std=c99' pip install gevent

我按照建议here以及CFLAGS='-std=c99' pip install gevent尝试了sudo,但它仍然无效。令人沮丧的是,我可以在我的virtualenv之外安装没有任何问题。这是错误:

configure: error: in `/Users/mc/.virtualenvs/mmbot/build/gevent/deps/libev':

configure: error: C compiler cannot create executables

See `config.log' for more details

Running '(cd  "/Users/mc/.virtualenvs/mmbot/build/gevent/deps/libev"  && sh ./configure   && cp config.h "$OLDPWD" ) > configure-output.txt' in /Users/mc/.virtualenvs/mmbot/build/gevent/build/temp.macosx-10.12-x86_64-2.7/libev

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py", line 183, in <module>

    run_setup(EXT_MODULES, run_make=_BUILDING)

  File "/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py", line 168, in run_setup

    "Development Status :: 4 - Beta"

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup

    dist.run_commands()

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands

    self.run_command(cmd)

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

    cmd_obj.run()

  File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/setuptools/command/install.py", line 59, in run

    return orig.install.run(self)

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 563, in run

    self.run_command('build')

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command

    self.distribution.run_command(command)

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

    cmd_obj.run()

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run

    self.run_command(cmd_name)

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command

    self.distribution.run_command(command)

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command

    cmd_obj.run()

  File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/setuptools/command/build_ext.py", line 49, in run

    _build_ext.run(self)

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 340, in run

    self.build_extensions()

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 449, in build_extensions

    self.build_extension(ext)

  File "_setuputils.py", line 159, in build_extension

    self.gevent_prepare(ext)

  File "_setuputils.py", line 156, in gevent_prepare

    configure(self, ext)

  File "_setuplibev.py", line 55, in configure_libev

    system(libev_configure_command)

  File "_setuputils.py", line 139, in system

    if _system(cmd):

  File "_setuputils.py", line 135, in _system

    return check_call(cmd, shell=True)

  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 186, in check_call

    raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '(cd  "/Users/mc/.virtualenvs/mmbot/build/gevent/deps/libev"  && sh ./configure   && cp config.h "$OLDPWD" ) > configure-output.txt' returned non-zero exit status 77

----------------------------------------
Cleaning up...
  Removing temporary dir /Users/mc/.virtualenvs/mmbot/build...
Command /Users/mc/.virtualenvs/mmbot/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-Nvp9pA-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mc/.virtualenvs/mmbot/bin/../include/site/python2.7 failed with error code 1 in /Users/mc/.virtualenvs/mmbot/build/gevent
Exception information:
Traceback (most recent call last):
  File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/req.py", line 706, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Users/mc/.virtualenvs/mmbot/lib/python2.7/site-packages/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /Users/mc/.virtualenvs/mmbot/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/mc/.virtualenvs/mmbot/build/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-Nvp9pA-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mc/.virtualenvs/mmbot/bin/../include/site/python2.7 failed with error code 1 in /Users/mc/.virtualenvs/mmbot/build/gevent

0 个答案:

没有答案