||
由于ureka已经挂了,目前官方推荐安装astroconda。
这里简单记录安装过程。
操作系统:macOS High Sierra 10.13.4
首先安装anaconda,从清华镜像下载,否则很慢。
镜像网站:https://mirrors.tuna.tsinghua.edu.cn/
安装好之后,本地修改镜像源:
$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
$ conda config --set show_channel_urls yes
也可直接修改文件:vim ~/.condarc,按格式输入,保存退出
$ conda info 查看配置信息
接下来安装astroconda,这里需要网速快,因为部分包只能从官网下载。
$ conda create -n iraf27 python=2.7 iraf-all pyraf-all stsci
安装结束,激活环境
$ source activate iraf27
$ pyraf
可能会报错:
AttributeError: Undefined IRAF task `chkupdate’
解决办法是修改login.cl:
$ vim ~/iraf/login.cl
将以下语句注释掉就可以了
# Check for updates to the system
chkupdate
# Notify the user if we're using the global login.
path (".") | scan (s1)
if ( osfn("home$") != substr (s1, strldx("!",s1)+1, strlen(s1)) ) {
printf (" *** Using global login file: %slogin.cl\n", osfn("home$"))
}
试用没问题,软件包都已经安装好了,不需要额外下载。
退出环境
$ source deactivate
简化命令:
alias saif='source activate iraf27'
alias sde='source deactivate'
总的来说,安装很简单,总耗时不超过1小时。
官网说的没错,比以前简便很多。
唯一要求,网速快。
参考资料:
1、http://astroconda.readthedocs.io/en/latest/
2、https://forum.stsci.edu/discussion/107/pyraf-cannot-be-executed
两个问题:
1、在我安装astroconda之前,已经装好iraf,但是安装pyraf失败。
如果有人安装成功,希望可以交流学习下。
2、先启动环境再启动pyraf,始终感觉有点繁琐,目前我还没办法一步到位。
如果有人知道方法,希望可以学习下。
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-26 16:26
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社