Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Building on a mac

Matti Picus edited this pageJul 10, 2020 ·1 revision

(Draft)

Accumulated knowlege for building NumPy on a macOS machine. Please add your hints with a date

2020-07-10

Here is what I (mattip) think the numpy build does on Azure:

#!/bin/bashfunction get_gfortran() {    sudo xcode-select -s /Applications/Xcode_10.app/Contents/Developer    curl -L https://github.com/MacPython/gfortran-install/raw/master/archives/gfortran-4.9.0-Mavericks.dmg -o gfortran.dmg    GFORTRAN_SHA256=$(shasum -a 256 gfortran.dmg)    KNOWN_SHA256="d2d5ca5ba8332d63bbe23a07201c4a0a5d7e09ee56f0298a96775f928c3c4b30  gfortran.dmg"    if [ "$GFORTRAN_SHA256" != "$KNOWN_SHA256" ]; then        echo sha256 mismatch        exit 1  # crashes your shell, watch out    fi    hdiutil attach -mountpoint /Volumes/gfortran gfortran.dmg    sudo installer -pkg /Volumes/gfortran/gfortran.pkg -target /        otool -L /usr/local/gfortran/lib/libgfortran.3.dylib    # Manually symlink gfortran-4.9 to plain gfortran for f2py.    # No longer needed after Feb 13 2020 as gfortran is already present    # and the attempted link errors. Keep this for future reference.    # ln -s /usr/local/bin/gfortran-4.9 /usr/local/bin/gfortran}function get_openblas() {    target=$(python tools/openblas_support.py)    # manually link to appropriate system paths    cp $target/lib/lib* /usr/local/lib/    cp $target/include/* /usr/local/include/    otool -L /usr/local/lib/libopenblas*}get_gfortran()get_openblas()python -m pip install -r test_requirements.txtBLAS: NoneLAPACK: NoneATLAS: NoneCC: /usr/bin/clangpython setup.py build -j 4 build_src --verbose-cfg install
Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp