Python3 [Mac版] Homebrew安裝權限不夠問題

Vic Chang
Oct 14, 2020

--

在Mac中使用Homebrew安裝Python3的時候,發生了一個權限不夠的錯誤。

vic$ brew install python3Updating Homebrew…Error: The following directories are not writable by your user:/usr/local/FrameworksYou should change the ownership of these directories to your user.sudo chown -R $(whoami) /usr/local/FrameworksAnd make sure that your user has write permission.chmod u+w /usr/local/Frameworks

依Homebrew給的解法輸入。

vic$ sudo chown -R $(whoami) /usr/local/Frameworks

接著再輸入一次安裝指令,就可以順利安裝完畢了。

vic$ brew install python3Updating Homebrew...==> Auto-updated Homebrew!Updated 1 tap (homebrew/cask).==> New Casksmtgaprotracker                   niftyman                         recaf                            time-to-leave==> Updated Casks4k-video-downloader              emclient                         marvel                           rectangle:
:
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2_3.catalina.bottle.tar.gz==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/80f141e695f73bd058fd82e9f539dc67471666ff6800c5e280b5af7d3050f435?response-######################################################################## 100.0%:
:

如果你因為xcode沒有安裝,而產生錯誤訊息,可以參考下面的解決方式。

Error: The following formulapython@3.8cannot be installed as binary package and must be built from source.Install the Command Line Tools:xcode-select — install

解決了上面的問題後,我們就可以開始使用python3了!

Hi,我是Vic,如果我的分享有幫到您的話,希望可以多給我一些拍手鼓勵^^ 👏👏👏

--

--

Vic Chang

誤以為創業很簡單的工程師 You will never be ready until you try to do it!