1.先去官网下载最新版的anaconda
2.用命令安装bash 下载的文件名
3.安装后如果无法启动,添加环境命令
vi .bash_profile
在文件内添加
export PATH=/安装路径/anaconda3/bin:$PATH
保存后使其生效
source .bash_profile
4.确认是否安装成功
conda --version
5.配置jupyter,使其远程可以访问
6.进入环境
ipython
在ipython环境下输入:
from notebook.auth import passwd
passwd()
密码设置后,保存生成的sha,并用exit()退出
7.进入安装目录
cd /安装目录/anaconda3/etc/jupyter,
执行jupyter notebook --generate-config
命令执行后会产生
/安装路径/anaconda/.jupyter/jupyter_notebook_config.py
8.编辑产生后的jupyter_notebook_config.py,输入以下内容
编辑配置文件,编辑此文件,写入
c.NotebookApp.ip = ‘*’ # 允许访问此服务器的 IP,星号表示任意 IP
c.NotebookApp.password = u’sha1:xxx:xxx’ # 之前生成的密码 hash 字串
c.NotebookApp.open_browser = False # 运行时不打开本机浏览器
c.NotebookApp.port = 12035 # 使用的端口,随意设置
c.NotebookApp.enable_mathjax = True # 启用 MathJax
9.启动jupyter
jupyter notebook
10.如果要在后台执行,用命令
nohup jupyter notebook --allow-root &
## JAVA支持
1.安装JDK
从官网下载JDK
2.解压安装JDK
3.配置环境变量,在/etc/profile增加以下内容
export JAVA_HOME=/安装路径/jdk
export PATH=
P
A
T
H
:
PATH:
PATH:JAVA_HOME/bin
export CLASSPATH=.:
J
A
V
A
H
O
M
E
/
l
i
b
/
d
t
.
j
a
r
:
JAVA_HOME/lib/dt.jar:
JAVAHOME/lib/dt.jar:JAVA_HOME/lib/tools.jar
export JRE_HOME=$JAVA_HOME/jre
4.从https://github.com/SpencerPark/IJava/releases下载ijava
5.解压ijava后得到install.py
6.安装install.py
python install.py
7.查看jupyter内核
jupyter kernelspec list
C++支持
1.创建虚拟环境
conda create -n name
2.切换到虚拟环境
conda activate cling
3.给新环境安装jupyter notebook
conda install jupyter notebook
4.安装xeus
conda install xeus-cling -c conda-forge
5.查看是否安装成功
jupyter kernelspec list