MacOS配置python环境

下载 Python

前往网站下载对应芯片和python版本的 installer。

配置环境变量

bash 复制代码
sudo vim ~/.bash_profile

添加一下内容,注意修改文件名。

bash 复制代码
export PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}"
alias python="/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11"

修改 zsh 配置

指定python解释器位置。

bash 复制代码
alias python=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
相关推荐
金銀銅鐵32 分钟前
用 Python 实现 Take-Away 游戏
python·游戏
copyer_xyf1 小时前
Agent 流程编排
后端·python·agent
copyer_xyf2 小时前
Agent RAG
后端·python·agent
copyer_xyf2 小时前
【RAG】向量数据库:milvus
后端·python·agent
元Y亨H2 小时前
MacBook Air 开发神器:IDEA 与 PyCharm 极简安装及环境配置
macos
copyer_xyf2 小时前
Agent 记忆管理
后端·python·agent
星云穿梭17 小时前
用Python写一个带图形界面的学生管理系统——完整教程
python
金銀銅鐵17 小时前
用 Pygame 实现 15 puzzle
python·数学·游戏
yuanyxh1 天前
macOS 应用 - 纯对话生成
前端·macos·ai编程
黄忠1 天前
大模型之LangGraph技术体系
python·llm