Mac更新python3.12?解決pip3安裝報錯問題小結
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
到此這篇關于Mac更新python3.12 解決pip3安裝報錯的文章就介紹到這了,更多相關python3.12 解決pip3安裝報錯內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
簡單了解Django ORM常用字段類型及參數(shù)配置
這篇文章主要介紹了簡單了解Django ORM常用字段類型及參數(shù)配置,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下2020-01-01Python?Pandas?修改表格數(shù)據(jù)類型?DataFrame?列的順序案例
這篇文章主要介紹了Python?Pandas?修改表格數(shù)據(jù)類型?DataFrame?列的順序案例,文章通過主題展開詳細的相關內容,感興趣的小伙伴可以參考一下2022-08-08Python計算一個點到所有點的歐式距離實現(xiàn)方法
今天小編就為大家分享一篇Python計算一個點到所有點的歐式距離實現(xiàn)方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-07-07