计算化学公社

 找回密码 Forget password
 注册 Register
Views: 3343|回复 Reply: 2
打印 Print 上一主题 Last thread 下一主题 Next thread

[其它量化程序] 求助:编译MOKIT时打不开Python.h

[复制链接 Copy URL]

334

帖子

0

威望

2357

eV
积分
2691

Level 5 (御坂)

跳转到指定楼层 Go to specific reply
楼主
本帖最后由 霜晨月 于 2022-3-14 14:37 编辑

老师好,在CentOS上面编译MOKIT遇到问题,查不到解决方案,恳请指导

MOKIT相关帖子:http://bbs.keinsci.com/thread-17310-1-1.html  @zjxitcc

我的ifort和icc、mkl来自intel2019u1,系统自带的python2的numpy太老没有f2py,更新numpy之后f2py可用。
按照https://gitlab.com/jxzou/mokit/-/blob/master/README_zh.md的说明进行编译:
cd mokit/src/
make all
报错如下:
build_src: building npy-pkg config files
running build_ext
Found executable /opt/intel2019u1/compilers_and_libraries_2019.1.144/linux/bin/intel64/icc
Could not locate executable ecc 【这句报错有影响吗?没查到ecc】
customize IntelEM64TCCompiler
C compiler: icc -m64 -fPIC -fp-model strict -O3 -fomit-frame-pointer -qopenmp

creating /tmp/tmp9TvcbJ/tmp
creating /tmp/tmp9TvcbJ/tmp/tmp9TvcbJ
compile options: '-MMD -MF /tmp/tmp9TvcbJ/file.c.d -c'
icc: /tmp/tmp9TvcbJ/file.c
customize IntelEM64TCCompiler using build_ext
customize IntelEM64TFCompiler
Found executable /opt/intel2019u1/compilers_and_libraries_2019.1.144/linux/bin/intel64/ifort
customize IntelEM64TFCompiler using build_ext
building 'auto_pair' extension
compiling C sources
C compiler: icc -m64 -fPIC -fp-model strict -O3 -fomit-frame-pointer -qopenmp

creating /tmp/tmpryl_ps/tmp
creating /tmp/tmpryl_ps/tmp/tmpryl_ps
creating /tmp/tmpryl_ps/tmp/tmpryl_ps/src.linux-x86_64-2.7
compile options: '-I/tmp/tmpryl_ps/src.linux-x86_64-2.7 -I/home/jmu/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
icc: /tmp/tmpryl_ps/src.linux-x86_64-2.7/auto_pairmodule.c
icc: /tmp/tmpryl_ps/src.linux-x86_64-2.7/fortranobject.c
/tmp/tmpryl_ps/src.linux-x86_64-2.7/auto_pairmodule.c(14): catastrophic error: cannot open source file "Python.h"
  #include "Python.h"
                     ^

compilation aborted for /tmp/tmpryl_ps/src.linux-x86_64-2.7/auto_pairmodule.c (code 4)
error: Command "icc -m64 -fPIC -fp-model strict -O3 -fomit-frame-pointer -qopenmp -I/tmp/tmpryl_ps/src.linux-x86_64-2.7 -I/home/jmu/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c /tmp/tmpryl_ps/src.linux-x86_64-2.7/auto_pairmodule.c -o /tmp/tmpryl_ps/tmp/tmpryl_ps/src.linux-x86_64-2.7/auto_pairmodule.o -MMD -MF /tmp/tmpryl_ps/tmp/tmpryl_ps/src.linux-x86_64-2.7/auto_pairmodule.o.d" failed with exit status 4
In file included from /tmp/tmpryl_ps/src.linux-x86_64-2.7/fortranobject.c(2):
/tmp/tmpryl_ps/src.linux-x86_64-2.7/fortranobject.h(7): catastrophic error: cannot open source file "Python.h"
  #include "Python.h"

                     ^

compilation aborted for /tmp/tmpryl_ps/src.linux-x86_64-2.7/fortranobject.c (code 4)
make: *** [auto_pair] Error 1



4291

帖子

4

威望

9565

eV
积分
13936

Level 6 (一方通行)

MOKIT开发者

2#
发表于 Post on 2022-3-14 15:05:36 | 只看该作者 Only view this author
像是Python.h版本过于老旧的原因,建议安装Anaconda Python3,机器上的旧Python别管了。
自动做多参考态计算的程序MOKIT

334

帖子

0

威望

2357

eV
积分
2691

Level 5 (御坂)

3#
 楼主 Author| 发表于 Post on 2022-3-14 16:41:23 | 只看该作者 Only view this author
zjxitcc 发表于 2022-3-14 15:05
像是Python.h版本过于老旧的原因,建议安装Anaconda Python3,机器上的旧Python别管了。

好的,我担心安装Anaconda python3会影响系统的python,所以没装。我试试看。谢谢老师

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-27 23:12 , Processed in 0.322657 second(s), 20 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list