安装Anaconda

1.下载

wget https://repo.anaconda.com/archive/Anaconda3-5.0.1-Linux-x86_64.sh

安装

在安装包路径下执行:

bash Anaconda3-5.0.1-Linux-x86_64.sh

安装过程中会需要不断回车来阅读并同意license。

安装路径默认为用户目录(可以自己指定),最后需要确认将路径加入用户的.bashrc中。

编辑.bashrc文件

打开文件

vi ~/.bashrc # 编辑 .bashrc

在最后一行加入:

export PATH="$PATH:~/anaconda3/bin"

保存

最后,立即使路径生效,需要在用户目录下执行:(一定不要忘了执行)

source ~/.bashrc

查看conda环境列表

conda info --envs

安装 Astropy 和 IRAF

步骤

换源

conda添加源

# 附更换清华镜像源的方式:

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --set show_channel_urls yes

# 附加库:

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/

conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

conda config --add channels http://ssb.stsci.edu/astroconda

查看源

conda config --show

删除源

conda config --remove channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

conda config --remove-key channels # 删除所有源

安装

conda create -n iraf27 python=2.7 iraf-all pyraf-all stsci

启动

~$ source activate iraf27

(iraf27) ~$ mkdir iraf

(iraf27) ~$ cd iraf

(iraf27) iraf$ mkiraf

-- creating a new uparm directory

Terminal types: xgterm,xterm,gterm,vt640,vt100,etc.

Enter terminal type [default xterm-256color]: xgterm

A new LOGIN.CL file has been created in the current directory.

You may wish to review and edit this file to change the defaults.

You may also add additional customizations to loginuser.cl

编辑login.cl

# LOGIN.CL -- User login file for the IRAF command language.

# Identify login.cl version (checked in images.cl).

if (defpar ("logver"))

logver = "IRAF V2.16 March 2012"

set home = "/home/zy/iraf/"

set imdir = "./" # edit!!

set cache = "U_CACHEDIR"

set uparm = "home$uparm/"

set userid = "zy"

# Set the terminal type. We assume the user has defined this correctly

# when issuing the MKIRAF and no longer key off the unix TERM to set a

# default.

if (access (".hushiraf") == no)

print "setting terminal type to xgterm..."

stty xgterm

# Uncomment and edit to change the defaults.

set editor = vi # edit!! 设置编辑器

#set printer = lp

#set pspage = "letter"

#set stdimage = imt800

#set stdimcur = stdimage

#set stdplot = lw

#set clobber = no

#set imclobber = no

#set filewait = yes

#set cmbuflen = 512000

#set min_lenuserarea = 64000

set imtype = "fits" # edit!! 设置图像格式

set imextn = "oif:imh fxf:fits,fit fxb:fxb plf:pl qpf:qp stf:hhh,??h"

# XIMTOOL/DISPLAY stuff. Set node to the name of your workstation to

# enable remote image display. The trailing "!" is required.

#set node = "my_workstation!"

# CL parameters you mighth want to change.

#ehinit = "nostandout eol noverify"

#epinit = "standout showall"

showtype = yes

# Default USER package; extend or modify as you wish. Note that this can

# be used to call FORTRAN programs from IRAF.

package user

task $adb $bc $cal $cat $comm $cp $csh $date $dbx $df $diff = "$foreign"

task $du $find $finger $ftp $grep $lpq $lprm $ls $mail $make = "$foreign"

task $man $mon $mv $nm $od $ps $rcp $rlogin $rsh $ruptime = "$foreign"

task $rwho $sh $spell $sps $strings $su $telnet $tip $top = "$foreign"

task $awk $vi $emacs $w $wc $less $rusers $sync $pwd $gdb = "$foreign"

task $more = "$foreign"

# edit!!

task $xc $mkpkg $generic $rtar $wtar $buglog = "$foreign"

#task $fc = "$xc -h $* -limfort -lsys -lvops -los"

task $fc = ("$" // envget("iraf") // "unix/hlib/fc.csh" //

" -h $* -limfort -lsys -lvops -los")

task $nbugs = ("$(setenv EDITOR 'buglog -e';" //

"less -Cqm +G " // envget ("iraf") // "local/bugs.*)")

task $cls = "$clear;ls"

task $clw = "$clear;w"

task $pg = ("$(less -Cqm $*)")

if (access ("home$loginuser.cl"))

cl < "home$loginuser.cl"

;

keep

# Load the default CL package. Doing so here allows us to override package

# paths and load personalized packages from our loginuser.cl.

clpackage

# List any packages you want loaded at login time, ONE PER LINE.

images # general image operators

plot # graphics tasks

dataio # data conversions, import export

lists # list processing

# The if(deftask...) is needed for V2.9 compatibility.

if (deftask ("proto"))

proto # prototype or ad hoc tasks

tv # image display

utilities # miscellaneous utilities

noao # optical astronomy packages

vo # Virtual Observatory tools

plot

prcache directory

cache directory page type help

# Print the message of the day.

if (access (".hushiraf"))

menus = no

else {

type hlib$motd

}

# Uncomment to initialize the SAMP interface on startup.

if (deftask ("samp") == yes) {

printf ("Initializing SAMP .... ")

if (sampHubAccess() == yes) {

# Enable SAMP messaaging. Set default handlers that don't require

# VO capabilities.

samp quiet

samp ("on", >& "dev$null")

# samp ("handler", "table.load.votable", "tinfo $url", >& "dev$null")

# samp ("handler", "image.load.fits", "imstat $url", >& "dev$null")

samp noquiet

print ("on")

} else

print ("No Hub Available\n")

}

# Delete any old MTIO lock (magtape position) files.

if (deftask ("mtclean"))

mtclean

else

delete uparm$mt?.lok,uparm$*.wcs verify-

keep

设置环境变量

Cl>set terminal=vt100

一些报错的解决方式

1.conda install 时出错: CondaError: Downloaded bytes did not match Content-Length

方法一

换源

方法二

设置conda下载的timeout,然后再进行尝试,如果时长不够可以再设置大一点。

conda config --set remote_read_timeout_secs 600.0

然后运行安装命令

conda install 包 即可。

方法三

从conda的源下载好要安装的包,直接采用本地安装的方式。下载的url再出错的地方有提示:

url: http://ssb.stsci.edu/astroconda/linux-64/iraf-2.16.UR.1-0.tar.bz2

离线安装:

conda install --offline ./iraf-2.16.UR.1-0.tar.bz2

启动iraf时输入cl报错:/usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

原因:64位系统中安装了32位程序

解决方法:

yum install glibc.i686

重新安装以后还有如下类系错误 再继续安装包

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

yum install libstdc++.so.6

conda安装ds9

conda install -c pkgw/label/superseded ds9

jupyter notebook配置

修改jupyter_notebook_config.py

jupyter notebook --generate-config

vi /home/zy/.jupyter/jupyter_notebook_config.py

作如下修改:

c.NotebookApp.allow_root = Ture

c.NotebookApp.notebook_dir = '路径'

关联Jupyter Notebook和conda的环境和包——“nb_conda”

conda install nb_conda

anaconda linux环境变量,配置anaconda环境(linux)相关推荐

  1. linux环境变量配置的方法,Linux环境变量配置方法

    Linux上环境变量配置分为设置永久变量和临时变量两种.环境变量设置方法同时要考虑环境Shell类型,不同类型的SHELL设置临时变量方法和设置永久变量对应的配置文件不同.Linux环境变量本身配置过 ...

  2. linux环境变量配置的方法,linux 设置环境变量方法是怎样的?Linux环境变量配置注意事项是什么?...

    linux系统是一种多用户的任务系统,它可以对每个用户都指定特定的用户变量.不同的程序在不同的环境下运行的时候,都需要去对环境变量来做定制,有很多朋友在设置 linux环境变量的时候,不知道如何操作, ...

  3. 【Flutter】Flutter 开发环境搭建 ( Android Studio 下 Flutter / Dart 插件安装 | Flutter SDK 安装 | 环境变量配置 | 开发环境检查 )

    文章目录 一.Flutter 学习资料 二.Flutter 开发环境搭建 三.Android Studio 环境安装 Flutter / Dart 插件 四.下载 Flutter SDK 五.设置 F ...

  4. java环境变量配置 JDK环境变量

    JAVA_HOME:C:\Program Files\Java\jdk1.6.0_21 PATH:%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin; classpath:.;%J ...

  5. jdk环境变量配置win7_jdk环境变量配置win764位

    win7系统配置adb环境变量的方法:1.首先右击计算机--属性--高级系统设置--环境变量;2.弹出"环境变量"对话框,单击"新建"一个环境变量;3.在新建. ...

  6. java环境变量配置jdk_java环境变量配置jdk安装图解.docx

    java环境变量配置jdk安装图解.docx 还剩 11页未读, 继续阅读 下载文档到电脑,马上远离加班熬夜! 亲,很抱歉,此页已超出免费预览范围啦! 如果喜欢就下载吧,价低环保! 内容要点: 继续输 ...

  7. java window linux_java环境变量配置(Windows Linux)

    前言: java 编程中 java 环境变量设置是开发最基础的要求,今天我们一起来学习相关要点和配置. 做些不太恰当但通俗易懂的比喻(个人理解): java 程序就好比汽车. jre(java 运行环 ...

  8. ubuntu安装eclipse java环境变量配置_【Linux学习】Ubuntu下安装JDK以及配置环境,和eclipse的下载...

    OpenJDK 还是 SunJDK? 由于刚开始接触Linux,所以在搜索如何安装jdk的问题上,有了不同的说法,其中有一种安装是直接安装OpenJDK,还有一种方法下载官方网站的SunJDK,那么两 ...

  9. python环境变量配置_Python环境变量的配置

    1.右击我的电脑,点击属性,选择高级系统设置 2.选择环境变量 3.第一步:选择系统变量中:path:第二步:选择编辑 4.找到python的存储路径,并复制 5.将路径粘贴在此处 6.点击" ...

最新文章

  1. Maven进价:Maven的安装和目录结构
  2. ElementNotVisible exception in Selenium WebDriver
  3. quantum_如何从Firefox Quantum删除Pocket
  4. 杨辉三角java代码_【LeetCode】118. 杨辉三角(Pascal#x27;s Triangle)解题思路
  5. C++中的错误处理方法(含示例代码)
  6. 参数展示初始三层架构
  7. 关于柯西许瓦兹不等式的一些思考
  8. CDOJ 483 Data Structure Problem DFS
  9. 汉诺塔问题解析(C语言)
  10. ads design environment_ADS射频仿真软件培训材料.pdf
  11. python分苹果问题_给大家分享一个「Python算法题」分苹果
  12. 电脑上的网站服务器在哪里能看到,怎么样查看windows电脑服务器IP地址
  13. PAT乙级 1068 万绿丛中一点红 (20 分) Java 实现
  14. SEO关键词之选取策略及具体方法
  15. 计算机cpu的定义,CPU是什么?
  16. 线性目标规划(线性目标规划、图解法、单纯形法)
  17. Docker拉取镜像报错error pulling image configuration
  18. 计算机内存槽清理,正确清理内存条和内存槽的方法
  19. hyper-v开虚机
  20. 移动磁盘使用驱动器中的光盘之前需要格式化数据如何恢复

热门文章

  1. uniAPP小程序webview从H5返回小程序不起作用
  2. Linux-IO全整理:BIO/NIO/IO多路复用解析
  3. js动态修改浏览器title标题
  4. 【硬件和驱动相关】wifi设备没有工作 ubuntu18.0.4 无线网卡 intel 6 AX200
  5. bnc转vga转换器
  6. 华为弹性云服务器进修复模式,华为云弹性云控制面板简要解析
  7. dhcp应该开启还是关闭(dhcp应该开启还是关闭)
  8. 微信开发者工具-真机调试,可查看接口信息
  9. springboot-模拟excel系统
  10. 读书随想2 - 格鲁夫给经理人的第一课