For A Breath I Tarry

I am better than me

Anaconda安装&Julia内核配置(Mac)

Anaconda的安装配置

1.下载安装
https://www.anaconda.com/download/#macos

2.环境配置
在.bashrc或.bash_profile中添加
export PATH="/<path to anaconda>/bin:$PATH"

3.验证安装
conda --version 查看当前conda版本
conda list 查看已安装的包和版本
python 进入有Anaconda提示信息的python shell

4.添加国内源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

5.conda环境管理
conda info --envs 查看已有环境,有*号的是当前环境
conda create --name snakes python=3.5 新建一个使用python3.5的环境snakes
source activate snakes 激活snakes环境
source deactivate 回到默认环境

参考:
https://docs.anaconda.com/anaconda/
https://conda.io/docs/user-guide/

Jupyter Notebook中Julia内核配置

1.安装Jupyter Notebook
打开Anaconda Navigator,安装Jupyter Notebook

2.验证安装
shell中输入jupyter notebook

3.安装Julia
https://julialang.org/downloads/

4.安装IJulia
在Julia中运行
Pkg.add("IJulia")
ENV["JUPYTER"]="/Users/username/anaconda3/bin/jupyter"
Pkg.build("IJulia")

5.验证安装
查看可用内核jupyter kernelspec list

参考:
https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
https://ipython.readthedocs.io/en/latest/install/kernel_install.html#kernels-for-different-environments
https://irkernel.github.io/installation/#source-panel
https://github.com/JuliaLang/IJulia.jl