Linux下安装配置Jupyter notebook
2019-04-26 18:00
555 查看
安装过程
[code]# 下载 pip install -i https://pypi.douban.com/simple jupyter # 生成配置文件 jupyter notebook --generate-config --allow-root # 配置文件生成在:~/.jupyter/jupyter_notebook_config.py # 设置密码 jupyter notebook password # 修改配置文件 # 设置监听地址,一般改为当前主机的ip sed -ie "s/#c.NotebookApp.ip = 'localhost'/c.NotebookApp.ip = 'IP地址'/g" ~/.jupyter/jupyter_notebook_config.py # 设置监听端口 sed -ie 's/#c.NotebookApp.port = 8888/c.NotebookApp.port = 8000/g' ~/.jupyter/jupyter_notebook_config.py # 禁用自动打开浏览器 sed -ie 's/#c.NotebookApp.open_browser = True/c.NotebookApp.open_browser = False/g' ~/.jupyter/jupyter_notebook_config.py # 启动 jupyter notebook --allow-root # 此时打开浏览器,输入 Jupyter服务器的ip:8000 # 进入登陆页面后,输入设置的密码即可登陆
问题:
打开或者new .ipynb文件时报错:
[code]File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get value = obj._trait_values[self.name] KeyError: 'secret' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/tornado/web.py", line 1699, in _execute result = await result File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/tornado/gen.py", line 209, in wrapper yielded = next(result) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/notebook/services/contents/handlers.py", line 112, in get path=path, type=type, format=format, content=content, File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/notebook/services/contents/filemanager.py", line 433, in get model = self._notebook_model(path, content=content) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/notebook/services/contents/filemanager.py", line 392, in _notebook_model self.mark_trusted_cells(nb, path) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/notebook/services/contents/manager.py", line 503, in mark_trusted_cells trusted = self.notary.check_signature(nb) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/nbformat/sign.py", line 438, in check_signature signature = self.compute_signature(nb) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/nbformat/sign.py", line 413, in compute_signature hmac = HMAC(self.secret, digestmod=self.digestmod) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__ return self.get(obj, cls) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get value = self._validate(obj, dynamic_default()) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/nbformat/sign.py", line 387, in _secret_default self._write_secret_file(secret) File "/home/user08/miniconda3/envs/study/lib/python3.6/site-packages/nbformat/sign.py", line 397, in _write_secret_file with io.open(self.secret_file, 'wb') as f: PermissionError: [Errno 13] Permission denied: '/home/user08/.local/share/jupyter/notebook_secret'
解决办法:
[code]sudo chmod 777 ~/.local/share/jupyter/ cd ~/.local/share/jupyter/ sudo chmod 777 runtime/ # 重启Jupyter
相关文章推荐
- Ubuntu-16.04 R 安装及Jupyter notebook 配置
- linux多虚拟环境安装jupyter notebook
- Linux上配置Jupyter Notebook远程访问
- Jupyter Notebook与Jupyterhub的安装与配置
- Linux下远程访问Jupyter Notebook 配置
- anaconda/jupyter-notebook 安装及Windows/Linux多版本设置
- Jupyter Notebook安装配置
- IPython与Jupyter notebook 安装与配置,插件扩展,主题,PDF输出
- 实验教程1:如何在阿里云服务器ECS上安装anaconda,配置远程访问的jupyter notebook
- Python安装 Anaconda 以及jupyter notebook配置
- Windows下Anaconda、Jupyter Notebook安装配置、bat脚本快捷启动IDE
- windows 子系统 linux (WLS):jupyter notebook 安装
- 安装配置远程jupyter notebook(原ipython notebook)
- Jupyter Notebook(一)安装配置与使用
- TensorFlow安装及jupyter notebook配置方法
- ubuntu系统下安装anaconda2并配置tensorflow环境及jupyter notebook工具远程登陆来开发用于深度学习环境
- jupyter notebook的安装、配置
- Jupyter Notebook(一)安装配置与使用
- 安装配置远程jupyter notebook(原ipython notebook)
- Windows, Ubuntu 下 Numpy, Scipy, matplotlib, jupyter notebook 安装配置