zoukankan      html  css  js  c++  java
  • ModuleNotFoundError: No module named 'jupyter_contrib_nbextensions' .ipynb文件转换.py文件时遇到错误

    C:UsersmoyuanDesktopfire500>jupyter nbconvert --to script *.ipynb
    Traceback (most recent call last):
      File "E:Work_SoftwareAnaconda3Scriptsjupyter-nbconvert-script.py", line 10, in <module>
        sys.exit(main())
      File "E:Work_SoftwareAnaconda3libsite-packagesjupyter_coreapplication.py", line 266, in launch_instance
        return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
      File "E:Work_SoftwareAnaconda3libsite-packages	raitletsconfigapplication.py", line 658, in launch_instance
        app.start()
      File "E:Work_SoftwareAnaconda3libsite-packages
    bconvert
    bconvertapp.py", line 337, in start
        self.convert_notebooks()
      File "E:Work_SoftwareAnaconda3libsite-packages
    bconvert
    bconvertapp.py", line 497, in convert_notebooks
        self.exporter = cls(config=self.config)
      File "E:Work_SoftwareAnaconda3libsite-packages
    bconvertexporters	emplateexporter.py", line 256, in __init__
        super(TemplateExporter, self).__init__(config=config, **kw)
      File "E:Work_SoftwareAnaconda3libsite-packages
    bconvertexportersexporter.py", line 109, in __init__
        self._init_preprocessors()
      File "E:Work_SoftwareAnaconda3libsite-packages
    bconvertexportersexporter.py", line 263, in _init_preprocessors
        self.register_preprocessor(preprocessor, enabled=True)
      File "E:Work_SoftwareAnaconda3libsite-packages
    bconvertexportersexporter.py", line 224, in register_preprocessor
        preprocessor_cls = import_item(preprocessor)
      File "E:Work_SoftwareAnaconda3libsite-packages	raitletsutilsimportstring.py", line 34, in import_item
        module = __import__(package, fromlist=[obj])
    ModuleNotFoundError: No module named 'jupyter_contrib_nbextensions'

     将.ipynb文件转换.py文件时遇到错误

     转换命令

    1 jupyter nbconvert --to script *.ipynb 

    错误原因,没有jupyter_contrib_nbextensions,可尝试下面的解决方案

    python -m pip install --user jupyter_contrib_nbextensions
    jupyter contrib nbextension install --user --skip-running-check
    python -m pip install --user jupyter_nbextensions_configurator
    jupyter nbextensions_configurator enable --user

    再次运行指令

    jupyter nbconvert --to script *.ipynb 

     成功

     参考博客:https://blog.csdn.net/m0_37586991/article/details/103180717

     

  • 相关阅读:
    NC外部统一流程管理平台方案
    Activiti 多个并发子流程的应用
    基于Activiti的流程应用开发平台JSAAS-WF V5.3
    整合Acitiviti在线流程设计器(Activiti-Modeler 5.18.0)
    基于Spring Security 的JSaaS应用的权限管理
    微信分享功能开发
    ORACLE schedule job设置
    存储过程清理N天前数据
    oracle函数trunc的使用
    往前往后推时间(排除工作日和节假日)
  • 原文地址:https://www.cnblogs.com/study-/p/13029182.html
Copyright © 2011-2022 走看看