[转自]CSDN

服务器操作

更新yum包

yum update -y

更新pip和setuptools

python -m pip install --upgrade pip
python -m pip install --upgrade setuptools

安装ipython和jupyter

pip install ipython==5.1.0
pip install jupyter -i https://pypi.python.org/simple

调整jupyter 运行参数,需要自行在阿里后台开放端口

阿里云的pip默认源会导致安装失败,炒鸡无敌爆炸坑

c.NotebookApp.allow_remote_access = True # 允许远程访问
c.NotebookApp.allow_root = True # 允许root权限
c.NotebookApp.ip = '0.0.0.0' # 设置监听IP
c.NotebookApp.open_browser = False # 设置运行方式为不打开浏览器
c.NotebookApp.password = u'sha1:******' # 插入生成的sha1密码,注释有教程如何生成
c.NotebookApp.password_required = True # 设置强制输入密码
c.NotebookApp.port = **** # 设置端口

后台运行

nohup jupyter notebook > jupyter.log &

What doesn’t kill you makes you stronger.