当前位置: 代码网 > it编程>前端脚本>Python > Mac更新python3.12 解决pip3安装报错问题小结

Mac更新python3.12 解决pip3安装报错问题小结

2024年05月28日 Python 我要评论
mac使用homebrew更新了python3.12,删除了以前的版本和pip3安装软件时候报错。error: externally-managed-environment× this e

mac使用homebrew更新了python3.12,删除了以前的版本和pip3安装软件时候报错。

error: externally-managed-environment

× this environment is externally managed
╰─> to install python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.
    if you wish to install a non-brew-packaged python package,
    create a virtual environment using python3 -m venv path/to/venv.
    then use path/to/venv/bin/python and path/to/venv/bin/pip.
    if you wish to install a non-brew packaged python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. make sure you have pipx installed.

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.

看了很多人说要删除externally-managed这个文件。

在mac系统里,这个文件藏在这里,删除即可。

/usr/local/cellar/python@3.12/3.12.3/frameworks/python.framework/versions/3.12/lib/python3.12

到此这篇关于mac更新python3.12 解决pip3安装报错的文章就介绍到这了,更多相关python3.12 解决pip3安装报错内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com