pythonの特定バージョンの環境が必要となったため、環境構築を行おうとしたのですが、pyenvによるインストールがうまくいかず困っています。調べて出てくる対処法は一通り試したのですが、どれも解決には至っていません。
以下詳細状況です。
pyenv install 3.7.3
を実行すると、以下のようなエラーメッセージが表示されます。
python-build: use openssl@1.1 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... python-build: use tcl-tk from homebrew python-build: use readline from homebrew BUILD FAILED (OS X 13.0.1 using python-build 20180424) Inspect or clean up the working tree at /var/folders/gk/_ybny47s6wnfzy968xq19_8r0000gn/T/python-build.20221204191115.24340 Results logged to /var/folders/gk/_ybny47s6wnfzy968xq19_8r0000gn/T/python-build.20221204191115.24340.log Last 10 log lines: checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... checking for --without-gcc... no checking for --with-icc... no checking for gcc... clang checking whether the C compiler works... no configure: error: in `/var/folders/gk/_ybny47s6wnfzy968xq19_8r0000gn/T/python-build.20221204191115.24340/Python-3.7.3': configure: error: C compiler cannot create executables See `config.log' for more details xcode-select: error: malformed developer path ("/Library/Developer/CommandLineTools")
PC環境はMac
OSは"Ventura 13.0.1"
CPUはIntelです。
他に必要な情報があれば助言いただけると幸いです。
3.7.3は現在の環境ではビルトできないとのことでしたので、試しに最新の3.11.0をインストールしようとしてみましたが、以下のようなエラーが出ました。
python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.11.0.tar.xz... -> https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tar.xz Installing Python-3.11.0... python-build: use tcl-tk from homebrew python-build: use readline from homebrew BUILD FAILED (OS X 13.0.1 using python-build 20180424) Inspect or clean up the working tree at /var/folders/gk/_ybny47s6wnfzy968xq19_8r0000gn/T/python-build.20221204195705.28384 Results logged to /var/folders/gk/_ybny47s6wnfzy968xq19_8r0000gn/T/python-build.20221204195705.28384.log Last 10 log lines: checking pkg-config is at least version 0.9.0... yes checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... "darwin" checking for gcc... clang checking whether the C compiler works... no configure: error: in `/var/folders/gk/_ybny47s6wnfzy968xq19_8r0000gn/T/python-build.20221204195705.28384/Python-3.11.0': configure: error: C compiler cannot create executables See `config.log' for more details xcode-select: error: malformed developer path ("/Library/Developer/CommandLineTools")
内容はところどころ変わっているのように思うのですが対処法はわかりません。