24小时热门版块排行榜    

查看: 1576  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 求材料,环境专业调剂 +3 18567500178 2026-03-18 3/150 2026-03-23 23:50 by 热情沙漠
[考研] 求调剂 +7 十三加油 2026-03-21 7/350 2026-03-23 23:48 by 热情沙漠
[考研] 291求调剂 +8 hhhhxn.. 2026-03-23 8/400 2026-03-23 23:15 by peike
[考研] 一志愿国科过程所081700,274求调剂 +3 三水研0水立方 2026-03-23 3/150 2026-03-23 23:11 by MajorWen
[考研] 361求调剂 +3 Glack 2026-03-22 3/150 2026-03-23 22:03 by fuyu_
[考研] 265求调剂 +10 梁梁校校 2026-03-17 10/500 2026-03-23 21:17 by 一切OK
[考研] 336化工调剂 +4 王大坦1 2026-03-23 5/250 2026-03-23 18:32 by allen-yin
[考研] 350求调剂 +6 weudhdk 2026-03-19 6/300 2026-03-23 15:47 by tangyuan0840221
[考研] 一志愿西安交通大学材料工程专业 282分求调剂 +11 枫桥ZL 2026-03-18 13/650 2026-03-22 20:26 by edmund7
[考研] 材料与化工085600,总分304,本科有两篇sci参与,求调剂 +4 幸运的酱酱 2026-03-22 5/250 2026-03-22 20:15 by edmund7
[考研] 一志愿中南化学(0703)总分337求调剂 +9 niko- 2026-03-19 10/500 2026-03-22 16:08 by ColorlessPI
[考博] 招收博士1-2人 +3 QGZDSYS 2026-03-18 4/200 2026-03-22 10:25 by QGZDSYS
[考研] 0856材料专硕353求调剂 +4 NIFFFfff 2026-03-20 4/200 2026-03-22 09:49 by 2026paper
[考研] 一志愿重庆大学085700资源与环境总分308求调剂 +7 墨墨漠 2026-03-20 7/350 2026-03-21 16:36 by barlinike
[考研] 085601调剂 358分 +3 zzzzggh 2026-03-20 4/200 2026-03-21 10:21 by luoyongfeng
[考研] 308求调剂 +3 阿姐阿姐家啊 2026-03-18 3/150 2026-03-20 23:24 by JourneyLucky
[考研] 材料学求调剂 +4 Stella_Yao 2026-03-20 4/200 2026-03-20 20:28 by ms629
[考研] 招收调剂硕士 +4 lidianxing 2026-03-19 12/600 2026-03-20 12:25 by lidianxing
[考研] 材料工程专硕调剂 +5 204818@lcx 2026-03-17 6/300 2026-03-18 22:55 by 204818@lcx
[考研] 收复试调剂生 +4 雨后秋荷 2026-03-18 4/200 2026-03-18 14:16 by elevennnne
信息提示
请填处理意见