为了试一下
THE OPEN SOURCE REPORT CARD
也就是部署开源报告 osrc.dfm.io/gmszone 剩下最后的问题,终于得到解决了。
运行了几次之后,numpy的版本还是1.6.2终于想起来会不会是路径引起的版本问题。
Python 2.7.5 (default, Sep 12 2013, 21:33:34)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import site
>>> site.getsitepackages()
['/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/Library/Python/2.7/site-packages']
>>>
看路径的方法大致就是
import site
site.getsitepackages()
运行起来时系统一直报错:
numpy random 'module' object has no attribute 'choice'
import numpy
print numpy.__version__
报了个1.6.2,很久之后还是没有明白,直到意识到了。
pip install numpy==1.7.1
无奈的是在学校对于这个网址的速度。。手动下了一个,编译。。
报错:
RuntimeError: Broken toolchain: cannot link a simple C program
主要问题还是
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
cc: _configtest.c
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
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
failure.
最后
sudo ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" python setup.py install
围观我的Github Idea墙, 也许,你会遇到心仪的项目