24小时热门版块排行榜    

CyRhmU.jpeg
查看: 1462  |  回复: 4

wqd198686

铁杆木虫 (正式写手)

[求助] 急求linux下安装numpy软件

我现在已经安装了python 2.7,现在要安装numpy软件,把site.cfg.example变为site.cfg,然后修改后面的mkl部分,如下

# MKL
#----
# For recent (9.0.21, for example) mkl, you need to change the names of the
# lapack library. Assuming you installed the mkl in /opt, for a 32 bits cpu:
# [mkl]
# library_dirs = /opt/intel/mkl/9.1.023/lib/32/
# lapack_libs = mkl_lapack
#
# For 10.*, on 32 bits machines:
# [mkl]
library_dirs = /opt/intel/mkl/10.0.5.025/lib/32/
include_dirs = /opt/intel/mkl/include
lapack_libs = mkl_lapack
mkl_libs = mkl, guide

保存,之后,进入 numpy-1.7.1目录下,执行编译命令
python setup.py install
出现如下错误:
Running from numpy source directory.
usage: svnversion wc_path [trail_url]
F2PY Version 2
Traceback (most recent call last):
  File "setup.py", line 214, in <module>
    setup_package()
  File "setup.py", line 207, in setup_package
    configuration=configuration )
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/core.py", line 152, in setup
    config = configuration()
  File "setup.py", line 147, in configuration
    config.add_subpackage('numpy')
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/misc_util.py", line 1003, in add_subpackage
    caller_level = 2)
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/misc_util.py", line 972, in get_subpackage
    caller_level = caller_level + 1)
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/misc_util.py", line 909, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "numpy/setup.py", line 9, in configuration
    config.add_subpackage('core')
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/misc_util.py", line 1003, in add_subpackage
    caller_level = 2)
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/misc_util.py", line 972, in get_subpackage
    caller_level = caller_level + 1)
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/misc_util.py", line 909, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "numpy/core/setup.py", line 896, in configuration
    blas_info = get_info('blas_opt',0)
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/system_info.py", line 338, in get_info
    return cl().get_info(notfound_action)
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/system_info.py", line 449, in __init__
    self.parse_config_files()
  File "/home/lcc01/CanTherm/numpy-1.7.1/numpy/distutils/system_info.py", line 456, in parse_config_files
    self.cp.read(self.files)
  File "/usr/local/lib/python2.5/ConfigParser.py", line 267, in read
    self._read(fp, filename)
  File "/usr/local/lib/python2.5/ConfigParser.py", line 462, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /home/lcc01/CanTherm/numpy-1.7.1/site.cfg, line: 143
' library_dirs = /opt/intel/mkl/10.0.5.025/lib/32/\n'
Exception exceptions.AttributeError: "'NoneType' object has no attribute 'maxint'" in <bound method Popen.__del__ of <subprocess.Popen object at 0x40490c4c>> ignored

急求高手帮助!!!!!!!!!!!!!!!!1
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

绿遍山原

铜虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
wqd198686: 金币+50, ★★★★★最佳答案, 谢谢 2013-08-16 08:15:56
ben_ladeng: 金币+1, 谢谢指教 2013-08-19 20:56:57
使用intel编译器安装numpy, scipy
numpy:
新建site.cfg:
[mkl]
library_dirs = /home/yyy/xxx/bin/intel/mkl/lib/intel64/
include_dirs = /home/yyy/xxx/bin/intel/mkl/include
mkl_libs = mkl_rt
lapack_libs =
修改./numpy-1.6.1/numpy/distutils/intelccompiler.py:
将self.cc_exe(class intel或class intelem里的)为:
self.cc_exe = 'icc -O3 -g -fPIC -fp-model strict -fomit-frame-pointer -openmp -xhost'
编译:
python setup.py config --compiler=intel build_clib --compiler=intel build_ext --compiler=intel install
64位将intel改为intelem
scipy编译:
python setup.py config --compiler=intel --fcompiler=intel build_clib --compiler=intel --fcompiler=intel build_ext --compiler=intel --fcompiler=intel install
64位同numpy修改命令行
要夢遊,不要催眠。
2楼2013-08-15 22:34:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

绿遍山原

铜虫 (小有名气)

内容已删除
要夢遊,不要催眠。
3楼2013-08-15 22:37:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

changsth

铜虫 (初入文坛)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
ben_ladeng: 金币+1, 谢谢指教 2013-08-19 20:57:05
wqd198686: 金币+50, ★★★很有帮助, 3x 2013-08-20 08:11:41
内容已删除
4楼2013-08-19 19:42:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

joker0832

铁虫 (小有名气)

内容已删除
5楼2016-04-13 14:33:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 wqd198686 的主题更新
信息提示
请填处理意见