Mac M3 Python 开发环境

终端工具

  • 系统终端

  • Xtermial

  • iTerm

➜  ~ echo $SHELL
/bin/zsh
➜  ~ echo $0
-zsh
➜  ~ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

➜  ~ bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)
Copyright (C) 2007 Free Software Foundation, Inc.
➜  ~ 


软件包管理

  • homebrew

➜  ~ which brew
/opt/homebrew/bin/brew

➜  ~ brew --version
Homebrew 4.6.3

➜  ~ brew list
==> Formulae
ca-certificates	mpdecimal	python@3.13	sqlite
ipython		openssl@3	readline	xz

==> Casks
font-meslo-lg-nerd-font	iterm2

Python IDE

  • Pycharm

Python 包管理

  • UV

➜  ~ uv --version
uv 0.8.11 (f892276ac 2025-08-14)
➜  ~ which uv
/Users/laoer/.local/bin/uv

代码格式化、静态检查

  • Ruff

➜  ~ uv pip list
Package           Version
----------------- -------
mypy              1.17.1
mypy-extensions   1.1.0
pathspec          0.12.1
ruff              0.12.9
typing-extensions 4.14.1

➜  ~ which ruff
/Users/laoer/.local/share/uv/tools/ruff/bin/ruff
➜  ~ ruff --version
ruff 0.12.9

静态类型检查

  • mypy

➜  ~ uv pip list
Package           Version
----------------- -------
mypy              1.17.1
mypy-extensions   1.1.0
pathspec          0.12.1
ruff              0.12.9
typing-extensions 4.14.1
➜  ~ which mypy
/Users/laoer/.local/share/uv/tools/ruff/bin/mypy
➜  ~ mypy --version
mypy 1.17.1 (compiled: yes)

其他小工具

  • devkits

评论