macOS环境安装jupyter notebook(极简版)

安装python

复制代码
brew install python

验证

复制代码
python3 --version

安装

下载python会自动下载pip,python3的是pip3。

下载jupyter,挂梯子快一点。

复制代码
pip3 install jupyter

加入环境变量

复制代码
# 打开终端配置文件(根据你的shell选择,默认是zsh)
open ~/.zshrc  # 若没有则用 touch ~/.zshrc 创建后再打开

# 在文件末尾添加以下内容
export PATH="/Users/lipengyu/Library/Python/3.9/bin:$PATH"

# 保存文件后,使配置生效
source ~/.zshrc

打开

复制代码
jupyter notebook

配置

创建配置

复制代码
jupyter notebook --generate-config

打开配置

复制代码
open ~/.jupyter/jupyter_notebook_config.py

配置目录

复制代码
c.NotebookApp.notebook_dir = '/Users/yourname/project/py-project'

换成启动你自己想要打开的目录路径

相关推荐
Xiu Yan3 天前
Python 数据分析:Pandas DataFrame 零基础入门教程
python·jupyter·pycharm·numpy·pandas
2501_915909063 天前
移动端开发工具链怎么组合比较好,iOS、Android、跨端三套配置方案
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
2501_915918414 天前
iOS编程用什么软件好?主流工具Xcode、AppCode、CodeRunner与新兴快蝎对比
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
Xiu Yan4 天前
Python 数据分析:Pandas Series 零基础入门教程
python·jupyter·pycharm·numpy·pandas
黑化旺仔5 天前
【OC】KVO
macos·ios·objective-c·cocoa
滕州市燕猫虎计算机科技工作室个体工商户5 天前
IDEA:Command line is too long
java·ide·intellij-idea
Liekkas Kono5 天前
macOS 27 安装 VMware Fusion 和 Win11 经验
macos·win11·vmware
AI编码进化论6 天前
云IDE介绍:环境模板化、Agent上云,云IDE该怎么选
开发语言·ide·人工智能·团队开发·ai编程
troy1287 天前
Python 基础语法(九):Django/Flask/FastAPI 三大 Web 框架详细对比解析
python·jupyter·django·flask·github·fastapi
我要见SA姐17 天前
DeepSeek Harness 开源贡献手记:从 Issue 到 Merge 的完整旅程
ide·vscode·python·自动化·编辑器