NipGeihou's blog NipGeihou's blog
  • Java

    • 开发规范
    • 进阶笔记
    • 微服务
    • 快速开始
    • 设计模式
  • 其他

    • Golang
    • Python
    • Drat
  • Redis
  • MongoDB
  • 数据结构与算法
  • 计算机网络
  • 应用

    • Grafana
    • Prometheus
  • 容器与编排

    • KubeSphere
    • Kubernetes
    • Docker Compose
    • Docker
  • 组网

    • TailScale
    • WireGuard
  • 密码生成器
  • 英文单词生成器
🍳烹饪
🧑‍💻关于
  • 分类
  • 标签
  • 归档

NipGeihou

我见青山多妩媚,料青山见我应如是
  • Java

    • 开发规范
    • 进阶笔记
    • 微服务
    • 快速开始
    • 设计模式
  • 其他

    • Golang
    • Python
    • Drat
  • Redis
  • MongoDB
  • 数据结构与算法
  • 计算机网络
  • 应用

    • Grafana
    • Prometheus
  • 容器与编排

    • KubeSphere
    • Kubernetes
    • Docker Compose
    • Docker
  • 组网

    • TailScale
    • WireGuard
  • 密码生成器
  • 英文单词生成器
🍳烹饪
🧑‍💻关于
  • 分类
  • 标签
  • 归档
  • 教程

    • 安装
    • 流程控制与定义函数
    • 数据结构(类型)
    • 模块
    • 输入与输出
    • 错误与异常
    • 类
    • 标准库
    • 虚拟环境和包
    • 开发环境
      • PyCharm Professional
      • VS Code
      • JupyterLab
        • 安装
        • 常规
        • helm
        • 操作
        • 快捷键
        • 扩展
        • 格式化代码
    • ORM - SQLAlchemy
  • Python
  • 教程
NipGeihou
2024-10-12
目录

开发环境

# PyCharm Professional

JetBrains 出品必属精品,DDDD。

根据上图创建的项目,本质上是创建了一个虚拟环境,在创建后的项目根目录下存在 .venv 文件夹。

# VS Code

Python in Visual Studio Code (opens new window)

插件:

  • Python - Visual Studio Marketplace (opens new window)

# JupyterLab

Project Jupyter | Home (opens new window)

  • 一个可以分部操作的、网页的 IDE
  • 非常适合随时随地开发
关于 JupyterLab 与 Jupyter Notebook

可理解 JupyterLab 是 Jupyter Notebook 的封装版本,功能更丰富

# 安装

# 常规

# 安装
pip install jupyterlab

# 启动
jupyter lab
jupyter lab --ip 0.0.0.0

# zsh提示找不到命令问题
> pip3 show jupyterlab | grep Location
Location: /home/ubuntu/.local/lib/python3.10/site-packages
> export PATH=/home/ubuntu/.local/lib/python3.10/site-packages:$PATH

# helm

  • jupyterhub 4.0.1-0.dev.git.6864.hfc323db4 · jupyterhub/jupyterhub (opens new window)
  • Zero to JupyterHub with Kubernetes — Zero to JupyterHub with Kubernetes documentation (opens new window)
helm repo add jupyterhub https://hub.jupyter.org/helm-chart/
helm install my-jupyterhub jupyterhub/jupyterhub --version 4.0.0

# 操作

  • 操作与其他 IDE 类似,主要是创建 Notebook 类型文件。
  • 格子 (Cell) 默认为 Code ,上方状态栏可更改为 markdown 来编写文档
  • Edit - Clear Cell Output :清除当前格子的输出内容
  • Edit - Clear Outputs of All Cells :清除所有格子的输出内容

# 快捷键

Win 含义
Shift + Enter 运行当前格代码

# 扩展

# 格式化代码

JupyterLab Code Formatter (opens new window)

pip install jupyterlab-code-formatter
pip install black isort
  • 重启启动 jupyter lab
  • 在顶部即会出现格式化按钮
上次更新: 2025/01/10, 15:19:35
虚拟环境和包
ORM - SQLAlchemy

← 虚拟环境和包 ORM - SQLAlchemy→

最近更新
01
元器件
05-23
02
iSCSI服务搭建
05-10
03
磁盘管理与文件系统
05-02
更多文章>
Theme by Vdoing | Copyright © 2018-2025 NipGeihou | 友情链接
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式