Mac更新python3.12?解決pip3安裝報錯問題小結(jié)
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系統(tǒng)里,這個文件藏在這里,刪除即可。
/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12

到此這篇關(guān)于Mac更新python3.12 解決pip3安裝報錯的文章就介紹到這了,更多相關(guān)python3.12 解決pip3安裝報錯內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
python基礎(chǔ)教程之匿名函數(shù)lambda
這篇文章主要介紹了 python基礎(chǔ)教程之匿名函數(shù)lambda的相關(guān)資料,需要的朋友可以參考下2017-01-01
Python的幾個高級語法概念淺析(lambda表達(dá)式閉包裝飾器)
本文主要記錄自己對幾個高級語法概念的理解:匿名函數(shù)、lambda表達(dá)式、閉包、裝飾器。這幾個概念并非Python特有,但本文只限于用Python做說明2016-05-05
用python記錄運(yùn)行pid,并在需要時kill掉它們的實例
下面小編就為大家?guī)硪黄胮ython記錄運(yùn)行pid,并在需要時kill掉它們的實例。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-01-01
Flask與數(shù)據(jù)庫的交互插件Flask-Sqlalchemy的使用
在構(gòu)建Web應(yīng)用時,與數(shù)據(jù)庫的交互是必不可少的部分,本文主要介紹了Flask與數(shù)據(jù)庫的交互插件Flask-Sqlalchemy的使用,具有一定的參考價值,感興趣的可以了解一下2024-03-03
Python map及filter函數(shù)使用方法解析
這篇文章主要介紹了Python map及filter函數(shù)使用方法解析,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2020-08-08
詳解Python連接MySQL數(shù)據(jù)庫的多種方式
這篇文章主要介紹了Python連接MySQL數(shù)據(jù)庫方式,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-04-04
Python模塊對Redis數(shù)據(jù)庫的連接與使用講解
這篇文章主要介紹了Python模塊對Redis數(shù)據(jù)庫的連接與使用,通過實例代碼給大家介紹了Python連接Redis數(shù)據(jù)庫方法,Python使用連接池連接Redis數(shù)據(jù)庫方法,感興趣的朋友跟隨小編一起看看吧2021-07-07

