Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Mac 10.8.2上的Numpy安装_Python_Numpy_Osx Mountain Lion - Fatal编程技术网

Python Mac 10.8.2上的Numpy安装

Python Mac 10.8.2上的Numpy安装,python,numpy,osx-mountain-lion,Python,Numpy,Osx Mountain Lion,我正在MacOS 10.8.2上运行Python2.6,并尝试安装Numpy以使用NLTK。 我已经研究了下面突出显示的几种方法,但尚未有任何运气安装该软件包 我已经按照建议安装了xcode,但这并没有解决任何问题 我试过了,用 返回以下消息 RuntimeError: Broken toolchain: cannot link a simple C program 直接安装,我从下载了dmg文件。当直接提取文件时,numpy抱怨需要安装Python 2.6或更高版本,因此这也失败了 我在某

我正在MacOS 10.8.2上运行Python2.6,并尝试安装Numpy以使用NLTK。 我已经研究了下面突出显示的几种方法,但尚未有任何运气安装该软件包

  • 我已经按照建议安装了xcode,但这并没有解决任何问题

  • 我试过了,用

    返回以下消息

    RuntimeError: Broken toolchain: cannot link a simple C program
    
  • 直接安装,我从下载了dmg文件。当直接提取文件时,
    numpy
    抱怨需要安装Python 2.6或更高版本,因此这也失败了

    我在某个地方读到MacOS附带了苹果版的Python,我想避免使用它;我已经安装了Eclipse和PyDev,并且相信我没有使用Apple版本,但是有没有办法确认这是真的,并且
    numpy
    正在“正确”的Python版本上安装

  • 当我试着跑的时候

    sudo轻松安装numpy

    我得到下面的输出。起初我认为这与找不到C/Fortran编译器有关,但当我直接构建它时,我安装了
    gfortran
    ,所以问题可能是别的。。。但是,我无法通过查看邮件的其余部分来诊断问题

  • 有人能给我指出一些明确的东西来帮助我安装
    numpy
    ?到目前为止,我所尝试的有什么问题吗

    提前谦虚地谢谢你

    Searching for numpy
    Reading http://pypi.python.org/simple/numpy/
    Reading http://numpy.scipy.org
    Reading http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
    Reading http://numeric.scipy.org
    Best match: numpy 1.6.2
    Downloading http://pypi.python.org/packages/source/n/numpy/numpy-1.6.2.zip#md5=7e13c931985f90efcfa0408f845d6fee
    Processing numpy-1.6.2.zip
    Running numpy-1.6.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6DObmd/numpy-1.6.2/egg-dist-tmp-KMbGBl
    Running from numpy source directory.non-existing path in '/private/tmp/easy_install-6DObmd/numpy-1.6.2/numpy/distutils': 'site.cfg'
    /bin/sh: svnversion: command not found
    /bin/sh: svnversion: command not found
    Could not locate executable f95
    Could not locate executable f90
    Could not locate executable f77
    Could not locate executable xlf90
    Could not locate executable xlf
    Could not locate executable ifort
    Could not locate executable ifc
    Could not locate executable g77
    Found executable /usr/local/bin/gfortran
    sh: /usr/bin/gcc-4.2: No such file or directory
    sh: /usr/bin/gcc-4.2: No such file or directory
    Traceback (most recent call last):
      File "/opt/local/bin/easy_install", line 8, in <module>
        load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1712, in main
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
        self.run_command(cmd)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 211, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 446, in easy_install
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 476, in install_item
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 655, in install_eggs
     File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 930, in build_and_install
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 919, in run_setup
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 62, in run_setup
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 105, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 64, in <lambda>
      File "setup.py", line 214, in <module>
      File "setup.py", line 207, in setup_package
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/core.py", line 186, in setup
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
        self.run_command(cmd)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/bdist_egg.py", line 167, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
        self.distribution.run_command(command)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/egg_info.py", line 8, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
        self.distribution.run_command(command)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 152, in run
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 163, in build_sources
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 298, in build_library_sources
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 385, in generate_sources
      File "/private/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/core/setup.py", line 696, in get_mathlib_info
    RuntimeError: Broken toolchain: cannot link a simple C program
    /tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/misc_util.py:252: RuntimeWarning: Parent module 'numpy.distutils' not found while handling absolute import
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
        func(*targs, **kargs)
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/misc_util.py", line 252, in clean_up_temporary_directory
    ImportError: No module named numpy.distutils
    Error in sys.exitfunc:
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
        func(*targs, **kargs)
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/misc_util.py", line 252, in clean_up_temporary_directory
    ImportError: No module named numpy.distutils
    
    搜索numpy
    阅读http://pypi.python.org/simple/numpy/
    阅读http://numpy.scipy.org
    阅读http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
    阅读http://numeric.scipy.org
    最佳匹配:numpy 1.6.2
    正在下载http://pypi.python.org/packages/source/n/numpy/numpy-1.6.2.zip#md5=7e13c931985f90efcfa0408f845d6fee
    处理numpy-1.6.2.zip
    运行numpy-1.6.2/setup.py-q bdist_egg--dist dir/tmp/easy_install-6DObmd/numpy-1.6.2/egg-dist-tmp-KMbGBl
    从“/private/tmp/easy_install-6DObmd/numpy-1.6.2/numpy/distutils”中的numpy源目录运行。不存在路径:“site.cfg”
    /bin/sh:sversion:未找到命令
    /bin/sh:sversion:未找到命令
    找不到可执行文件f95
    找不到可执行文件f90
    找不到可执行文件f77
    找不到可执行文件xlf90
    找不到可执行文件xlf
    找不到可执行ifort
    找不到可执行文件ifc
    找不到可执行文件g77
    找到可执行文件/usr/local/bin/gfortran
    sh:/usr/bin/gcc-4.2:没有这样的文件或目录
    sh:/usr/bin/gcc-4.2:没有这样的文件或目录
    回溯(最近一次呼叫最后一次):
    文件“/opt/local/bin/easy_install”,第8行,在
    加载入口点('setuptools==0.6c11','console\u scripts','easy\u install')()
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第1712行,主目录
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第1700行,带_ei_用法
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第1716行,在
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py”,第152行,在安装程序中
    dist.run_命令()
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py”,第987行,在run_命令中
    self.run_命令(cmd)
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py”,第1007行,在run_命令中
    cmd_obj.run()
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第211行,正在运行
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第446行,在easy_install中
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第476行,安装项
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第655行,在install_-egs中
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第930行,内置_和_安装
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py”,第919行,在运行安装程序中
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py”,第62行,在运行设置中
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py”,第105行,正在运行
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py”,第64行
    文件“setup.py”,第214行,在
    文件“setup.py”,第207行,在setup\u包中
    文件“/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/core.py”,第186行,在安装程序中
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py”,第152行,在安装程序中
    dist.run_命令()
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py”,第987行,在run_命令中
    self.run_命令(cmd)
    文件“/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py”,第1007行,在run_命令中
    cmd_obj.run()
    Fi
    
    Searching for numpy
    Reading http://pypi.python.org/simple/numpy/
    Reading http://numpy.scipy.org
    Reading http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103
    Reading http://numeric.scipy.org
    Best match: numpy 1.6.2
    Downloading http://pypi.python.org/packages/source/n/numpy/numpy-1.6.2.zip#md5=7e13c931985f90efcfa0408f845d6fee
    Processing numpy-1.6.2.zip
    Running numpy-1.6.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6DObmd/numpy-1.6.2/egg-dist-tmp-KMbGBl
    Running from numpy source directory.non-existing path in '/private/tmp/easy_install-6DObmd/numpy-1.6.2/numpy/distutils': 'site.cfg'
    /bin/sh: svnversion: command not found
    /bin/sh: svnversion: command not found
    Could not locate executable f95
    Could not locate executable f90
    Could not locate executable f77
    Could not locate executable xlf90
    Could not locate executable xlf
    Could not locate executable ifort
    Could not locate executable ifc
    Could not locate executable g77
    Found executable /usr/local/bin/gfortran
    sh: /usr/bin/gcc-4.2: No such file or directory
    sh: /usr/bin/gcc-4.2: No such file or directory
    Traceback (most recent call last):
      File "/opt/local/bin/easy_install", line 8, in <module>
        load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1712, in main
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1716, in <lambda>
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
        self.run_command(cmd)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 211, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 446, in easy_install
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 476, in install_item
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 655, in install_eggs
     File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 930, in build_and_install
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 919, in run_setup
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 62, in run_setup
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 105, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 64, in <lambda>
      File "setup.py", line 214, in <module>
      File "setup.py", line 207, in setup_package
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/core.py", line 186, in setup
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
        self.run_command(cmd)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/bdist_egg.py", line 167, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
        self.distribution.run_command(command)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/egg_info.py", line 8, in run
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
        self.distribution.run_command(command)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 152, in run
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 163, in build_sources
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 298, in build_library_sources
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/command/build_src.py", line 385, in generate_sources
      File "/private/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/core/setup.py", line 696, in get_mathlib_info
    RuntimeError: Broken toolchain: cannot link a simple C program
    /tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/misc_util.py:252: RuntimeWarning: Parent module 'numpy.distutils' not found while handling absolute import
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
        func(*targs, **kargs)
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/misc_util.py", line 252, in clean_up_temporary_directory
    ImportError: No module named numpy.distutils
    Error in sys.exitfunc:
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
        func(*targs, **kargs)
      File "/tmp/easy_install-GH52RV/numpy-1.6.2/numpy/distutils/misc_util.py", line 252, in clean_up_temporary_directory
    ImportError: No module named numpy.distutils
    
    >>> /usr/bin/python2.7
    Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
    [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import numpy
    
    export CC=gcc
    export CXX=g++
    export FFLAGS=ff2c