質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

908閲覧

pyenv installでpythonのインストールができない

Itta

総合スコア105

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2020/12/31 02:06

###質問内容
お世話になります。
pyenvでpython3系をインストールをしたところ、下記のようなエラーが出てしましました。

python-build: use openssl from homebrew python-build: use readline from homebrew Downloading Python-3.6.5.tar.xz... -> https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz Installing Python-3.6.5... python-build: use readline from homebrew python-build: use zlib from xcode sdk BUILD FAILED (OS X 11.1 using python-build 20180424) Inspect or clean up the working tree at /var/folders/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231103608.19441 Results logged to /var/folders/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231103608.19441.log Last 10 log lines: checking for --with-universal-archs... no checking MACHDEP... darwin 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/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231103608.19441/Python-3.6.5': configure: error: C compiler cannot create executables See `config.log' for more details make: *** No targets specified and no makefile found. Stop.

/var/folders/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231105113.21027.log
の内容

/var/folders/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231105113.21027 ~ /var/folders/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231105113.21027/Python-3.6.5 /var/folders/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231105113.21027 ~ checking build system type... x86_64-apple-darwin20.2.0 checking host system type... x86_64-apple-darwin20.2.0 checking for python3.6... no checking for python3... python3 checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... darwin 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/q4/9yt0j4891jl9hg81lwmtpvjc0000gn/T/python-build.20201231105113.21027/Python-3.6.5': configure: error: C compiler cannot create executables See `config.log' for more details make: *** No targets specified and no makefile found. Stop.

###やってみたこと
xcode-select --installを試してみたところ

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

と出てきました。

pyenvを削除してからもう一度入れ直したらこのような状態になりました。
いろいろ調べてみましたが、さっぱり原因がわかりません。
どなたかわかるかはご教示お願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

quickquip

2020/12/31 06:20

CPUがなにかと、pyenvを入れた方法と、なぜわざわざ古い3.6.5を入れようとしているのかを質問に追記してください。
guest

回答1

0

ベストアンサー

softwareupdate --list して、update可能なものが存在することを確認し、

softwareupdate --install -a 
で全てのソフトウェアをupdateすると起きているエラーに対してはなんとかなりそうです。

これで問題が起きたら、一度xcodeをまるっと削除して新しく入れ直しても解決はできそうです。

投稿2020/12/31 03:55

educ_gt

総合スコア282

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

Itta

2020/12/31 09:10 編集

ありがとうございます。 softwareupdate --listでupdate可能なものはありませんでしたが、 Xcodeを新しいものに変えたところ、うまくいきました。
technocore

2020/12/31 08:42

原因と解決した方法を公開して下さい。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問