Jupyter notebook 在AWS Sagemaker上安装Jupytext插件
允许您将笔记本另存为普通python或标记文件。优点之一是,您可以在合并请求中进行简单的git差异处理Jupyter notebook 在AWS Sagemaker上安装Jupytext插件,jupyter-notebook,jupyter,amazon-sagemaker,jupyter-lab,Jupyter Notebook,Jupyter,Amazon Sagemaker,Jupyter Lab,允许您将笔记本另存为普通python或标记文件。优点之一是,您可以在合并请求中进行简单的git差异处理 如何在AWS Sagemaker上的jupyter/jupyterlab环境中安装jupytext插件?要在jupyter(lab)中安装jupytext,请使用以下脚本: #/bin/bash set-e echo“将jupytext插件安装到jupyter(实验室)环境中” sudo-u ec2 user-i/home/ec2 user/.jupyter/jupyter\u noteboo
如何在AWS Sagemaker上的jupyter/jupyterlab环境中安装jupytext插件?要在jupyter(lab)中安装jupytext,请使用以下脚本:
#/bin/bash
set-e
echo“将jupytext插件安装到jupyter(实验室)环境中”
sudo-u ec2 user-i/home/ec2 user/.jupyter/jupyter\u notebook\u config.py
#重新启动jupyter以使更改生效。
sudo initctl重新启动jupyter服务器--无需等待
EOF
我得到了nbdime-jupyterlab@2.0.0"与当前JupyterLab行中的jupyter Lab扩展不兼容安装JupyterLab jupytext我还有nbdime-jupyterlab@2.0.0与当前JupyterLab冲突依赖项不兼容
如果您有此问题nbdime-jupyterlab@2.0.0与当前的JupyterLab不兼容冲突的依赖项
并且您不使用jupyterlab,您可以对行jupyter labextension安装jupyterlab jupytext进行注释
#!/bin/bash
set -e
echo "installing jupytext plugin into the jupyter(lab) environment"
sudo -u ec2-user -i <<EOF
# to install jupyter plugins, you need to select the jupyter environment
source /home/ec2-user/anaconda3/bin/activate /home/ec2-user/anaconda3/envs/JupyterSystemEnv
# install jupytext
pip install jupytext --upgrade
# As of Feb 2021, Sagemaker is using jupyterlab v 1.x for which Jupytext recommends the following version.
jupyter labextension install jupyterlab-jupytext@1.1.1
# allow jupyter to open and save notebooks as text files.
echo c.NotebookApp.contents_manager_class="jupytext.TextFileContentsManager" >> /home/ec2-user/.jupyter/jupyter_notebook_config.py
# restart jupyter to let the changes take effect.
sudo initctl restart jupyter-server --no-wait
EOF