24小时热门版块排行榜    

查看: 1572  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 07化学280分求调剂 +4 722865 2026-03-23 4/200 2026-03-24 00:01 by chixmc
[考研] 一志愿北京化工大学 070300 学硕 336分 求调剂 +7 vv迷 2026-03-22 7/350 2026-03-23 23:44 by Txy@872106
[考研] 材料专硕英一数二306 +8 z1z2z3879 2026-03-18 8/400 2026-03-23 20:49 by baobaoye
[基金申请] 请教下大家 2026年国家基金申请是双盲审吗? +3 lishucheng1 2026-03-22 4/200 2026-03-23 20:48 by god_tian
[考研] 一志愿南航材料专317分求调剂 +3 炸呀炸呀炸薯条 2026-03-23 3/150 2026-03-23 20:47 by pswait
[考研] 336求调剂 +4 收到VS 2026-03-20 4/200 2026-03-23 19:02 by macy2011
[考研] 一志愿南京理工大学085701资源与环境302分求调剂 +5 葵梓卫队 2026-03-18 7/350 2026-03-23 16:26 by lingjue
[考研] 307求调剂 +3 余意卿 2026-03-21 3/150 2026-03-23 10:32 by Iveryant
[考研] 317求调剂 +12 申子申申 2026-03-19 18/900 2026-03-22 22:23 by luoyongfeng
[考研] 286求调剂 +10 Faune 2026-03-21 10/500 2026-03-21 23:34 by 314126402
[考研] 一志愿东华大学控制学硕320求调剂 +3 Grand777 2026-03-21 3/150 2026-03-21 19:23 by 简之-
[考研] 一志愿南大,0703化学,分数336,求调剂 +3 收到VS 2026-03-21 3/150 2026-03-21 18:42 by 学员8dgXkO
[考研] 307求调剂 +3 余意卿 2026-03-18 3/150 2026-03-21 17:31 by ColorlessPI
[考研] 材料学学硕080502 337求调剂-一志愿华中科技大学 +4 顺顺顺mr 2026-03-18 5/250 2026-03-21 10:22 by luoyongfeng
[考研] 265求调剂 +3 Jack?k?y 2026-03-17 3/150 2026-03-21 03:17 by JourneyLucky
[考研] 304求调剂 +6 曼殊2266 2026-03-18 6/300 2026-03-21 00:32 by JourneyLucky
[考研] 353求调剂 +3 拉钩不许变 2026-03-20 3/150 2026-03-20 19:56 by JourneyLucky
[考研] 一志愿吉林大学材料学硕321求调剂 +11 Ymlll 2026-03-18 15/750 2026-03-20 19:40 by 丁丁*
[考研] 0856调剂,是学校就去 +8 sllhht 2026-03-19 9/450 2026-03-20 14:25 by 无懈可击111
[考研] 考研调剂 +3 淇ya_~ 2026-03-17 5/250 2026-03-17 09:25 by Winj1e
信息提示
请填处理意见