Last active
January 6, 2024 07:25
-
-
Save goldsmith/7262122 to your computer and use it in GitHub Desktop.
How to install Numpy and Scipy on Mac OS X Mavericks (10.9) using Pip.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set up flags for Numpy C extentions compiling | |
export CFLAGS="-arch i386 -arch x86_64" | |
export FFLAGS="-m32 -m64" | |
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64" | |
export CC=gcc-4.2 | |
export CXX="g++ -arch i386 -arch x86_64" | |
pip install numpy | |
# success! | |
# now for scipy | |
easy_install cython | |
# make sure you have Homebrew | |
brew install gfortran | |
# if this is too slow or has an error | |
# install gfotran from the Mac OS X Lion installer for Intel 64-bit processors | |
# http://gcc.gnu.org/wiki/GFortranBinaries#MacOS | |
# finally | |
pip install -e git+https://github.com/scipy/scipy#egg=scipy-dev | |
# Let me know if this works for you! jhghank@gmail.com |
try this?
export CFLAGS="-arch i386 -arch x86_64 -Qunused-arguments"
export CPPFLAGS="-Qunused-arguments"
Thanks a lot!
and thank you @fogathmann it works for me
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have some problem with Cpython . any got any solution:
Searching for cython
Reading http://pypi.python.org/simple/cython/
Best match: Cython 0.20.1
Downloading https://pypi.python.org/packages/source/C/Cython/Cython-0.20.1.tar.gz#md5=52431696c64e618036537c4d9aa79d99
Processing Cython-0.20.1.tar.gz
Running Cython-0.20.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-P4GGuh/Cython-0.20.1/egg-dist-tmp-SNjzLk
warning: no files found matching '.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '.pxd' under directory 'Cython/Utility'
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: Setup script exited with error: command 'cc' failed with exit status 1