Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jupyter notebook 在AWS Sagemaker上安装Jupytext插件_Jupyter Notebook_Jupyter_Amazon Sagemaker_Jupyter Lab - Fatal编程技术网

Jupyter notebook 在AWS Sagemaker上安装Jupytext插件

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

允许您将笔记本另存为普通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 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