pip3安装包报错error: externally-managed-environment 方案一、(粗暴) 去掉这个提示 python3importsys sys.path cd/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12rm EXTERNALLY-MANAGED 方案二、(推荐) 使用pipx brew install pipx 方案三、(高阶) 使用venv ...
# 新建配置文件 vim ~/.pip/pip.conf # 写入地址 [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host = https://pypi.tuna.tsinghua.