24小时热门版块排行榜    

查看: 1571  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 求调剂 +7 十三加油 2026-03-21 7/350 2026-03-23 23:48 by 热情沙漠
[考研] 一志愿吉大化学322求调剂 +3 17501029541 2026-03-23 4/200 2026-03-23 23:47 by Txy@872106
[考研] 一志愿北京化工大学 070300 学硕 336分 求调剂 +7 vv迷 2026-03-22 7/350 2026-03-23 23:44 by Txy@872106
[考研] 299求调剂 +5 某某某某位 2026-03-21 5/250 2026-03-23 23:36 by 热情沙漠
[考研] 材料专硕英一数二306 +8 z1z2z3879 2026-03-18 8/400 2026-03-23 20:49 by baobaoye
[考研] 276求调剂 +3 YNRYG 2026-03-21 4/200 2026-03-23 08:31 by 醉在风里
[考研] 324求调剂 +6 lucky呀呀呀鸭 2026-03-20 6/300 2026-03-22 16:01 by ColorlessPI
[考研] 269专硕求调剂 +6 金恩贝 2026-03-21 6/300 2026-03-22 14:31 by ColorlessPI
[考研] 318求调剂 +4 plum李子 2026-03-21 7/350 2026-03-22 14:17 by ColorlessPI
[考研] 286求调剂 +10 Faune 2026-03-21 10/500 2026-03-21 23:34 by 314126402
[考研] 286分人工智能专业请求调剂愿意跨考! +4 lemonzzn 2026-03-17 8/400 2026-03-21 22:49 by lemonzzn
[考研] 资源与环境 调剂申请(333分) +5 holy J 2026-03-21 5/250 2026-03-21 22:42 by Catalysis25
[考研] 材料学硕301分求调剂 +7 Liyouyumairs 2026-03-21 7/350 2026-03-21 22:31 by peike
[考研] 【考研调剂】化学专业 281分,一志愿四川大学,诚心求调剂 +11 吃吃吃才有意义 2026-03-19 11/550 2026-03-21 18:23 by 学员8dgXkO
[考研] 266求调剂 +3 哇呼哼呼哼 2026-03-20 3/150 2026-03-21 16:46 by barlinike
[考研] 308求调剂 +3 阿姐阿姐家啊 2026-03-18 3/150 2026-03-20 23:24 by JourneyLucky
[考研] 求调剂一志愿南京航空航天大学289分 +3 @taotao 2026-03-19 3/150 2026-03-20 21:34 by JourneyLucky
[考研] 一志愿西安交通大学 学硕 354求调剂211或者双一流 +3 我想要读研究生 2026-03-20 3/150 2026-03-20 20:13 by JourneyLucky
[考研] 求调剂 +3 eation27 2026-03-20 3/150 2026-03-20 19:32 by JourneyLucky
[考研] 广西大学家禽遗传育种课题组2026年硕士招生(接收计算机专业调剂) +3 123阿标 2026-03-17 3/150 2026-03-20 15:58 by 飞行琦
信息提示
请填处理意见