Macで学習環境を整えたいのですが、Pythonのインストールができません。
色々調べたのですが、原因が分かりません。
宜しくお願いいたします。
参照
https://qiita.com/crankcube@github/items/15f06b32ec56736fc43a
https://qiita.com/zreactor/items/c3fd04417e0d61af0afe
##環境
Macbook Air 2018
OS Mojave 10.14.5
Xcode 10.2.1
発生している問題・エラーメッセージ
~$ pyenv install 3.7.3 python-build: use openssl from homebrew python-build: use readline from homebrew Downloading Python-3.7.3.tar.xz... -> https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz Installing Python-3.7.3... mkdir: /user/local/var/pyenv/versions/3.7.3/lib: Permission denied BUILD FAILED (OS X 10.14.5 using python-build 20180424) Inspect or clean up the working tree at /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627000553.37738 Results logged to /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627000553.37738.log Last 10 log lines: /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627000553.37738 ~ /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627000553.37738/Python-3.7.3 /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627000553.37738 ~ ~$ env CPPFLAGS="-I/usr/local/opt/zlib/include" LDFLAGS="-L/usr/local/opt/zlib/lib" pyenv install 3.7.3 python-build: use openssl from homebrew python-build: use readline from homebrew Downloading Python-3.7.3.tar.xz... -> https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz Installing Python-3.7.3... mkdir: /user/local/var/pyenv/versions/3.7.3/lib: Permission denied BUILD FAILED (OS X 10.14.5 using python-build 20180424) Inspect or clean up the working tree at /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627002321.38706 Results logged to /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627002321.38706.log Last 10 log lines: /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627002321.38706 ~ /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627002321.38706/Python-3.7.3 /var/folders/sj/23sp3hy14c9fd_35xs0b61300000gn/T/python-build.20190627002321.38706 ~
試したこと
1 Xcodeをインストール
~$ xcode-select --print-path /Applications/Xcode.app/Contents/Developer
2 Homebrewをインストール
~$ brew doctor Your system is ready to brew.
3 pyenvインストール
~$ pyenv --version pyenv 1.2.12
4 インストーラーupdate
~$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / installer: Package name is macOS_SDK_headers_for_macOS_10.14 installer: Upgrading at base path / installer: The upgrade was successful.
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/27 12:07