配置jupyter的启动路径

jupyter的安装参考:python环境安装jupyter-CSDN博客

1,背景

继上一篇python环境安装jupyter,里面有一个问题,就是启动jupyter(命令jupyter notebook)之后,页面默认显示的是启动时候的路径。

那有没有可能每次启动,让其自动进入项目文件夹呢?

2,配置Jupyter启动路径

在实际配置之前,可以看一下jupyter notebook有那些命令

C:\Users\PC>jupyter notebook --help
Jupyter Notebook - A web-based notebook environment for interactive computingOptions
=======
The options below are convenience aliases to configurable class-options,
as listed in the "Equivalent to" description-line of the aliases.
To see all configurable class-options for some <cmd>, use:<cmd> --help-all--debugSet debug level for the extension and underlying server applications.Equivalent to: [--ServerApp.log_level=DEBUG --ExtensionApp.log_level=DEBUG]
--show-configShow the application's configuration (human-readable format)Equivalent to: [--Application.show_config=True]
--show-config-jsonShow the application's configuration (json format)Equivalent to: [--Application.show_config_json=True]
--generate-config  #生成默认配置文件generate default config fileEquivalent to: [--JupyterApp.generate_config=True]
-yAnswer yes to any questions instead of prompting.Equivalent to: [--JupyterApp.answer_yes=True]
--allow-rootAllow the server to be run from root user.Equivalent to: [--ServerApp.allow_root=True]
--no-browserPrevent the opening of the default url in the browser.Equivalent to: [--ServerApp.open_browser=False --ExtensionApp.open_browser=False]
--autoreloadAutoreload the webappEnable reloading of the tornado webapp and all imported Python packageswhen any changes are made to any Python src files in server orextensions.Equivalent to: [--ServerApp.autoreload=True]
--scriptDEPRECATED, IGNOREDEquivalent to: [--FileContentsManager.save_script=True]
--no-scriptDEPRECATED, IGNOREDEquivalent to: [--FileContentsManager.save_script=False]
--expose-app-in-browserExpose the global app instance to browser via window.jupyterapp.Equivalent to: [--JupyterNotebookApp.expose_app_in_browser=True]
--custom-cssLoad custom CSS in template html files. Default is TrueEquivalent to: [--JupyterNotebookApp.custom_css=True]
--log-level=<Enum>Set the log level by value or name.Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']Default: 30Equivalent to: [--Application.log_level]
--config=<Unicode>Full path of a config file.Default: ''Equivalent to: [--JupyterApp.config_file]To see all available configurables, use `--help-all`.

我们这次可以使用--generate-config来生成一个默认的配置文件
PS:可以看到配置文件路径的提示:

C:\Users\PC>jupyter notebook --generate-config
Writing default config to: C:\Users\PC\.jupyter\jupyter_notebook_config.py   #生成的路径

用记事本打开文件,修改默认文件夹的配置:

将c.ServerApp.root_dir 设置为项目路径

保存并重启jupyter,可以看到即使是从C盘启动的jupyter,打开之后的目录是指定的目录

C:\Users\PC>
C:\Users\PC>jupyter notebook --generate-config
Writing default config to: C:\Users\PC\.jupyter\jupyter_notebook_config.py

PS:网上很多说法是设定c.ServerApp.notebook_dir = 'D:\jupyter_workspace',这个也可以。
配置文件里面提示说这个配置已经不推荐,推荐使用root_dir,所以我这边用的root_dir的方式设置的。

jupyter相关的文档可以从下面的help进入:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/3783.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

AI 边缘计算平台 - 嘉楠堪智 CanMV K230 开箱

CanMV-K230 开发板采用的是嘉楠科技 Kendryte 系列 AIoT 芯片中的最新一代 SoC 芯片 K230。该芯片采用全新的多异构单元加速计算架构&#xff0c;最新高性能 RISC-V CPU 内置双核玄铁 C908 CPU, 主频高达 1.6GHz&#xff1b;是全球首款支持 RISC-V Vector 1.0 标准的商用 SoC&a…

python中如何用matplotlib写饼图

#代码 import matplotlib.pyplot as plt# 设置绘图的主题风格 plt.style.use(ggplot) # 中文乱码和坐标轴负号的处理 plt.rcParams[font.sans-serif][SimHei] plt.rcParams[axes.unicode_minus]False plt.rcParams[figure.figsize][10,8] # 构造数据 x [0.2515,0.3724,0.3336…

靠这套 Pytest 接口自动化测试框架,击败了99%的人

&#x1f345; 视频学习&#xff1a;文末有免费的配套视频可观看 &#x1f345; 点击文末小卡片 &#xff0c;免费获取软件测试全套资料&#xff0c;资料在手&#xff0c;涨薪更快 Pytest 的下载安装 1、Python3 使用 pip install -U pytest 安装 2、查看 pytest 版本信息 py…

七天速记前端八股文(重点)

for in和正常for循环的区别 在遍历数组时&#xff0c;正常的 for 循环通常比 for...in 循环更适合。虽然 for...in 循环可以用于遍历数组&#xff0c;但它有一些潜在的问题和限制。 下面是一些使用 for 循环相对于 for...in 循环的优势&#xff1a; 顺序遍历&#xff1a;for…

【nodejs状态库mobx之computed规则】

The above example nicely demonstrates the benefits of a computed value, it acts as a caching point. Even though we change the amount, and this will trigger the total to recompute, it won’t trigger the autorun, as total will detect its output hasn’t been …

泛微E9开发 如何自定义流程标题

1、功能背景 主表中有“选择类别”下拉框字段&#xff0c;用户可以根据需求来选择申请类别&#xff0c;一般多个相似流程的申请可以合并成一个&#xff0c;但是为了区分&#xff0c;我们可以通过将标题修改的方式来使整个显示页面更明确。 2、展示效果 3、实现方法 注意&…

吴恩达深度学习笔记:深度学习的 实践层面 (Practical aspects of Deep Learning)1.6-1.8

目录 第一门课&#xff1a;第二门课 改善深层神经网络&#xff1a;超参数调试、正 则 化 以 及 优 化 (Improving Deep Neural Networks:Hyperparameter tuning, Regularization and Optimization)第一周&#xff1a;深度学习的 实践层面 (Practical aspects of Deep Learning)…

knife4j 空指针异常

knife4j 空指针异常 一开始正常访问&#xff0c;但是改着改着&#xff0c;就无法访问了&#xff0c;百度了一圈没找到原因&#xff0c;最后对比了之前版本的区别发现这里有问题。最后把这个注解去掉就好了。 只是我本人遇到的问题是这样的&#xff0c;仅供参考

C++对象的初始化和处理

生活中我们买的电子产品都基本会有出厂设置!在某一天我们不用时候也会删除一些自己信息数据保证安全。 C中的面向对象来源于生活&#xff0c;每个对象也都会有初始设置以及对象销毁前的清理数据的设置。 构造函数和析构函数 对象的初始化和清理也是两个非常重要的安全问题 一…

Android Studio布局

文章目录 LinearLayout线性布局排列方向排列位置行列权重 LinearLayout线性布局 从行开始&#xff0c;顶格 排列方向 android:orientation“horizontal”android:orientation“vertical”排列位置 注意layout_width和layout_height的值是match_parent还是wrap_content&…

03_Scala变量和数据类型

文章目录 [toc] **变量和数据类型****1.注释****2.变量和常量****3. 标识符的命名规范****4.scala的字符串****5.键盘输入****5.1 StdIn.readLine()****5.2 从文件中读取数据****5.3 Scala向外写数据** 变量和数据类型 1.注释 和Java完全一样 ** ** 2.变量和常量 var name…

Shell脚本学习记录

0.理解Linux文件权限 0.1 Linux安全性 用户的权限是通过创建用户时分配的用户ID(UID)来追踪的&#xff0c;UID是个数值&#xff0c;每个用户都有一个唯一的UID 0.1.1 /etc/passwd文件 Linux系统使用一个专门的文件/etc/passwd来匹配登录名与对应的UID值&#xff0c;该文件包…

力扣37题:回溯算法之解数独

编写一个程序&#xff0c;通过填充空格来解决数独问题。 数独的解法需 遵循如下规则&#xff1a; 数字 1-9 在每一行只能出现一次。数字 1-9 在每一列只能出现一次。数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。&#xff08;请参考示例图&#xff09; 数独部分空…

R基本的数据管理

一&#xff0c;创建变量 创建一个数据框 > myData<-data.frame(x1c(1,2,3,4,5,6),x2c(6,5,67,8,9,0)) > myDatax1 x2 1 1 6 2 2 5 3 3 67 4 4 8 5 5 9 6 6 0增加一列为两者的和 > myData$sum<-myData$x1myData$x2 > myDatax1 x2 sum 1 1 6 …

Python浅谈清朝秋海棠叶版图

1、清朝疆域概述&#xff1a; 清朝是我国最后一个封建王朝&#xff0c;其始于1616年建州女真部努尔哈赤建立后金&#xff0c;此后统一女真各部、东北地区。后又降服漠南蒙古&#xff0c;1644年入关打败农民起义军、灭南明&#xff0c;削三藩&#xff0c;复台湾。后又收外蒙&am…

Visual Studio 2022 Professional、Enterprise安装教程

Visual Studio 2022 Professional、Enterprise安装教程 下载安装包安装 我是电脑已经有VS2019&#xff0c;现在加装一个VS2022。 下载安装包 首先下载安装包&#xff0c;进入官网进行下载&#xff0c;VS官网下载地址。 进入之后&#xff0c;会显示如下界面&#xff0c;选择Pro…

安卓NetworkStatsManager使用及demo

目录 一、TrafficStats类简介二、demo示例 一、TrafficStats类简介 TrafficStats Android API 8提供了android.net.TrafficStats类。 通过此类能获取设备重启以来网络信息&#xff0c;部分函数如下所示&#xff1a; static long getMobileRxBytes() //获取通过移动数据网络…

开放式激光振镜运动控制器的视觉校正振镜精度解决方案

市场应用背景 激光振镜控制系统因具有惯量小、低负载、响应速度极快等优点&#xff0c;非常适合高速微加工应用&#xff0c;如激光标刻、焊接、3D打印和精密切割等应用。 激光振镜控制系统主要涵盖了激光振镜控制和图形校正等两个技术层面&#xff0c;来共同控制激光在加工过…

【自动化测试入门】Selenium基础(建议收藏)

&#x1f525; 交流讨论&#xff1a;欢迎加入我们一起学习&#xff01; &#x1f525; 资源分享&#xff1a;耗时200小时精选的「软件测试」资料包 &#x1f525; 教程推荐&#xff1a;火遍全网的《软件测试》教程 &#x1f4e2;欢迎点赞 &#x1f44d; 收藏 ⭐留言 &#x1…

【Android】 四大组件详解之广播接收器、内容提供器

目录 前言广播机制简介系统广播动态注册实现监听网络变化静态注册实现开机自启动 自定义广播发送标准广播发送有序广播 本地广播 内容提供器简介运行时权限访问其他程序中的数据ContentResolver的基本用法读取系统联系人 创建自己的内容提供器创建内容提供器的步骤 跨程序数据共…