关于python:JupyterLab3-桌面版快速配置qbit

4次阅读

共计 764 个字符,预计需要花费 2 分钟才能阅读完成。

环境

Windows 10
Python 3.8
JupyterLab 3.0.9
Chrome 88

步骤

  • 装置 JupyterLab
pip3 install jupyterlab --user
  • 生成配置文件
jupyter lab --generate-config
  • 编辑配置文件 C:\Users\qbit\.jupyter\jupyter_lab_config.py
# 设置默认目录
c.NotebookApp.notebook_dir = 'D:/Python3Project/JupyterLab'
# 设置以 chrome app 模式启动
c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe  --app=%s'
# 在无流动 3 秒钟后敞开 server
c.NotebookApp.shutdown_no_activity_timeout = 3
# 在无流动 2 秒钟后敞开内核
c.MappingKernelManager.cull_idle_timeout = 2
# 每 1 秒钟检测内核是否闲暇
c.MappingKernelManager.cull_interval = 1
  • 创立启动快捷方式
# JupyterLocal
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Start-Process jupyter lab -WindowStyle Hidden
  • 双击 JupyterLocalInit 启动

  • 给 JupyterLab 增加 pyspark 环境(胡乱插入:))
pip install pyspark
set PYSPARK_DRIVER_PYTHON_OPTS="C:/Python38/Scripts/jupyter-lab.exe"

本文出自 qbit snap

正文完
 0