【问题标题】:Numpy in Python 3 on OSX?OSX 上 Python 3 中的 Numpy?
【发布时间】:2012-09-22 16:49:11
【问题描述】:

我在 OSX Lion (10.7) 上运行 Python 3.3,并尝试通过 pip 安装 numpy

pip install numpy

这是使用virtualenvwrapper 创建的虚拟环境。但是,我得到:

$ pip install numpy
Downloading/unpacking numpy
  Downloading numpy-1.6.2.tar.gz (2.6MB): 2.6MB downloaded
  Running setup.py egg_info for package numpy
    RefactoringTool: Skipping implicit fixer: buffer
    RefactoringTool: Skipping implicit fixer: idioms
    RefactoringTool: Skipping implicit fixer: set_literal
    RefactoringTool: Skipping implicit fixer: ws_comma
    RefactoringTool: Refactored /Users/aparkin/.envs/omgwhatverdoiget/build/numpy/build/py3k/numpy/__init__.py
    RefactoringTool: Refactored /Users/aparkin/.envs/omgwhatverdoiget/build/numpy/build/py3k/numpy/_import_tools.py
    RefactoringTool: Refactored /Users/aparkin/.envs/omgwhatverdoiget/build/numpy/build/py3k/numpy/ctypeslib.py
    RefactoringTool: Refactored /Users/aparkin/.envs/omgwhatverdoiget/build/numpy/build/py3k/numpy/dual.py

...  MANY LINES OMITTED ....

numpy/core/src/multiarray/nditer_pywrap.c: In function ânpyiter_ass_subscriptâ:

numpy/core/src/multiarray/nditer_pywrap.c:2314: warning: passing argument 1 of âPySlice_GetIndicesâ from incompatible pointer type

lipo: can't figure out the architecture type of: /var/folders/7m/62gtb_jbz4g8g8b5dz046gp17h0168/T//ccyGGQyx.out

----------------------------------------
Command /Users/aparkin/.envs/omgwhatverdoiget/bin/python3 -c "import setuptools;__file__='/Users/aparkin/.envs/omgwhatverdoiget/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/7m/62gtb_jbz4g8g8b5dz046gp17h0168/T/pip-eh07x0-record/install-record.txt --single-version-externally-managed --install-headers /Users/aparkin/.envs/omgwhatverdoiget/bin/../include/site/python3.3 failed with error code 1 in /Users/aparkin/.envs/omgwhatverdoiget/build/numpy
Storing complete log in /Users/aparkin/.pip/pip.log

嗯,帮忙?

完整的 pip.log 位于 http://pastebin.com/pzdLUM2r(并且相当大——大约 6400 行)

【问题讨论】:

    标签: macos numpy python-3.x


    【解决方案1】:

    周末安装 Python 3.3 时,我只是按照 here 的指示进行操作。似乎工作正常。

    希望这会有所帮助,

    亚当。

    【讨论】:

    • 对我不起作用,我到达 python setup.py build 并收到错误消息:clang: error: linker command failed with exit code 1 (use -v to see invocation) Running from numpy source directory.error: Command "clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.6-intel-3.3/build/src.macosx-10.6-intel-3.3/numpy/core/src/_sortmodule.o -Lbuild/temp.macosx-10.6-intel-3.3 -lnpymath -o build/lib.macosx-10.6-intel-3.3/numpy/core/_sort.so" failed with exit status 1
    • 尝试将关于 sdk 的行从 10.6 更改为 10.7
    • 您有 /Developer 文件夹吗?由于某种原因,它似乎没有找到 sdk。
    • $ ls /Developer 给出:lrwxr-xr-x 1 root wheel 79 1 Oct 13:35 /Developer@ -> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/,所以是的。
    猜你喜欢
    • 2013-01-15
    • 2013-06-29
    • 1970-01-01
    • 2016-06-14
    • 2012-09-03
    • 1970-01-01
    • 1970-01-01
    • 2016-11-04
    相关资源
    最近更新 更多