当前位置: 首页 > news >正文

M1 Mac pip3 install错误记录

M芯片mac pip install 错误记录

环境

  • M3芯片Mac
  • Python3.13.1
  • pip 24.3.1

场景

安装 nacos-sdk-python 时安装失败

% pip3 install nacos-sdk-pythonerror: externally-managed-environment× This environment is externally managed
╰─> To install Python packages system-wide, try brew installxyz, where xyz is the package you are trying toinstall.If you wish to install a Python library that isn't in Homebrew,use a virtual environment:python3 -m venv path/to/venvsource path/to/venv/bin/activatepython3 -m pip install xyzIf you wish to install a Python application that isn't in Homebrew,it may be easiest to use 'pipx install xyz', which will manage avirtual environment for you. You can install pipx withbrew install pipxYou may restore the old behavior of pip by passingthe '--break-system-packages' flag to pip, or by adding'break-system-packages = true' to your pip.conf file. The latterwill permanently disable this error.If you disable this error, we STRONGLY recommend that you additionallypass the '--user' flag to pip, or set 'user = true' in your pip.conffile. Failure to do this can result in a broken Homebrew installation.Read more about this behavior here: <https://peps.python.org/pep-0668/>note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
binsail@binsailpro demo % brew installXyz
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
^C^C

解决方案

cd /opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13
mv EXTERNALLY-MANAGED EXTERNALLY-MANAGED-bak

重新安装

pip3 install nacos-sdk-python

相关文章:

  • 罗技K580蓝牙键盘连接mac pro
  • 【Java面试笔记:进阶】30.Java程序运行在Docker等容器环境有哪些新问题?
  • 网络安全之浅析Java反序列化题目
  • webrtc ICE 打洞总结
  • Kafka Producer的acks参数对消息可靠性有何影响?
  • Windows 中的 bat(批处理)文件处理使用教程典型实例和实战技巧
  • Chrome 136 H265 WebRTC 支持 正式版本已包含
  • JESD204B 探究
  • [FPGA VIDEO IP] VCU
  • SQL Server 数据库重命名
  • 数据转储(go)
  • 麒麟、UOS系统在线打开word文件并提取修订痕迹
  • SpringBoot多工程项目微服务install时如何不安装到本地仓库
  • word模板填充导出-(支持word导出、pdf导出)
  • Langchain+文本摘要-refine
  • 芯片软错误概率探究:基于汽车芯片安全设计视角
  • 理解数据库存储以及查询(集合)
  • 数据科学与计算
  • 免疫细胞靶点“破局战”:从抗体到CAR-T,自免疾病治疗的3大技术突破
  • 【算法学习】哈希表篇:哈希表的使用场景和使用方法
  • 《探秘海昏侯国》数字沉浸特展亮相首届江西文化旅游产业博览交易会
  • 从“长绳系日”特展看韩天衡求艺之路
  • “80后”杨占旭已任辽宁阜新市副市长,曾任辽宁石油化工大学副校长
  • 辽宁省委书记、省长连夜赶赴辽阳市白塔区火灾事故现场,指导善后处置工作
  • 保利发展去年净利润约50亿元,在手现金1342亿元
  • AI应用大盘点:谁暴涨?谁掉队?