1、安装uv优先安装uv官方独立脚本避免brew的坑curl -LsSf https://astral.sh/uv/install.sh | sh2、配置path# 写入zsh永久环境变量echo export PATH$HOME/.local/bin:$PATH ~/.zshrc# 重载配置生效source ~/.zshrc# 验证uv --version uvx --version3、配置镜像mkdir -p ~/.config/uvnano ~/.config/uv/uv.toml镜像配置# 默认pip源 清华[[index]]url https://pypi.tuna.tsinghua.edu.cn/simpledefault true# 备用阿里源[[index]]url https://mirrors.aliyun.com/pypi/simple# Python官方二进制国内镜像uv python install加速python-install-mirror https://mirror.nju.edu.cn/github-release/astral-sh/python-build-standalone/# 并发下载提速[concurrency]downloads 12保存CtrlO回车 →CtrlX4、安装python# 安装稳定版3.12LangChain开发首选uv python install 3.12# 查看本地所有Python uv python list# 设置全局默认Python uv python pin 3.125、查看版本uv run python --version6、安装PyCharm7、创建项目8、终端进入项目安装依赖cd xxxxxuv add langchain# Requires Python 3.10# Installing the OpenAI integrationuv add langchain-openai# Installing the Anthropic integrationuv add langchain-anthropic