在Mac 10.9.5上安装PyCrypto时出错 [英] Error installing PyCrypto on Mac 10.9.5

查看:83
本文介绍了在Mac 10.9.5上安装PyCrypto时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Python 3.4安装PyCrypto,但是我在使用C编译程序时遇到了问题. 它说错误:无法运行C编译程序". 有人知道如何解决它吗?

i'm trying to install PyCrypto for Python 3.4 but i'm having problem with the C compiled programs. it says that "error: cannot run C compiled program". anyone have an idea how to fix it??

代码:

running build
running build_py
running build_ext
running build_configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/Users/briansabbath/Desktop/pycrypto-2.6.1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Traceback (most recent call last):
  File "setup.py", line 456, in <module>
    core.setup(**kw)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/command/build.py", line 126, in run
    self.run_command(cmd_name)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 251, in run
    self.run_command(cmd_name)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 278, in run
    raise RuntimeError("autoconf error")
RuntimeError: autoconf error

推荐答案

这可能表明您没有安装像gcc这样的C编译器.运行以下命令可能会有所帮助(必须在xcode中安装命令行工具):

This might indicate that you did not install C compiler likes gcc. Run the following command might help (command line tool must be installed in xcode):

xcode-select --install

这篇关于在Mac 10.9.5上安装PyCrypto时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆