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

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

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

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Python

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

Q&A

解決済

1回答

5483閲覧

pyenv install 3.6.9 が実行できない

退会済みユーザー

退会済みユーザー

総合スコア0

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Python

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

0グッド

0クリップ

投稿2019/11/18 06:37

編集2019/11/18 10:03

前提・実現したいこと

現在python3.6.5を使用しているが、アナコンダと同じ3.6.9に変更したいためpyenvを使用して変更しようとしている

発生している問題・エラーメッセージ

python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.6.9.tar.xz... -> https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz Installing Python-3.6.9... python-build: use readline from homebrew python-build: use zlib from xcode sdk BUILD FAILED (OS X 10.14.6 using python-build 20180424) Inspect or clean up the working tree at /var/folders/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118174942.13224 Results logged to /var/folders/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118174942.13224.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/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118174942.13224/Python-3.6.9': configure: error: C compiler cannot create executables See `config.log' for more details make: *** No targets specified and no makefile found. Stop. (base) twinte-MacBook-Pro:~ yuka$ cd var/folders/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118174942.13224/Python-3.6.9 bash: cd: var/folders/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118174942.13224/Python-3.6.9: No such file or directory

該当のソースコード

pyenv install 3.6.9

試したこと

pyenvのアップデート
xcode-select --installの実行
config.logの中身を色々と調べてみたところ、似たような問題で悩んでいた方が見つからず、自分でもよく理解できなかったため、皆様のお力を貸してください
【追記】アドバイスいただいた通りhttps://teratail.com/questions/179205の手法でcurlを/usr/bin/curlとなるように調整、未だエラーのまま
以下config.logの中身

config.log

1This file contains any messages produced by co 2mpilers while 3running configure, to aid debugging if configure makes a mistake. 4 5It was created by python configure 3.6, which was 6generated by GNU Autoconf 2.69. Invocation command line was 7 8(中略) 9 10 11## ----------- ## 12## Core tests. ## 13## ----------- ## 14 15configure:2801: checking build system type 16configure:2815: result: x86_64-apple-darwin18.7.0 17configure:2835: checking host system type 18configure:2848: result: x86_64-apple-darwin18.7.0 19configure:2878: checking for python3.6 20configure:2894: found /usr/local/bin/python3.6 21configure:2905: result: python3.6 22configure:3005: checking for --enable-universalsdk 23configure:3052: result: no 24configure:3075: checking for --with-universal-archs 25configure:3090: result: no 26configure:3240: checking MACHDEP 27configure:3449: result: darwin 28configure:3470: checking for --without-gcc 29configure:3493: result: no 30configure:3496: checking for --with-icc 31configure:3516: result: no 32configure:3640: checking for gcc 33configure:3667: result: clang 34configure:3896: checking for C compiler version 35configure:3905: clang --version >&5 36Apple LLVM version 10.0.1 (clang-1001.0.46.4) 37Target: x86_64-apple-darwin18.7.0 38Thread model: posix 39InstalledDir: /Library/Developer/CommandLineTools/usr/bin 40configure:3916: $? = 0 41configure:3905: clang -v >&5 42Apple LLVM version 10.0.1 (clang-1001.0.46.4) 43Target: x86_64-apple-darwin18.7.0 44Thread model: posix 45InstalledDir: /Library/Developer/CommandLineTools/usr/bin 46Found CUDA installation: /usr/local/cuda, version unknown 47configure:3916: $? = 0 48configure:3905: clang -V >&5 49clang: error: unsupported option '-V -Wno-atomic-implicit-seq-cst' 50clang: error: no input files 51configure:3916: $? = 1 52configure:3905: clang -qversion >&5 53clang: error: unknown argument '-qversion', did you mean '--version'? 54clang: error: no input files 55configure:3916: $? = 1 56configure:3936: checking whether the C compiler works 57configure:3958: clang -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl@1.1/include -I/Users/user/.pyenv/versions/3.6.9/include -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl@1.1/lib -L/Users/user/.pyenv/versions/3.6.9/lib conftest.c >&5 58dyld: Library not loaded: @rpath/libtapi.dylib 59 Referenced from: /Library/Developer/CommandLineTools/usr/bin/ld 60 Reason: image not found 61clang: error: unable to execute command: Abort trap: 6 62clang: error: linker command failed due to signal (use -v to see invocation) 63configure:3962: $? = 254 64configure:4000: result: no 65configure: failed program was: 66| /* confdefs.h */ 67| #define _GNU_SOURCE 1 68| #define _NETBSD_SOURCE 1 69| #define __BSD_VISIBLE 1 70| #define _BSD_TYPES 1 71| #define _DARWIN_C_SOURCE 1 72| /* end confdefs.h. */ 73| 74| int 75| main () 76| { 77| 78| ; 79| return 0; 80| } 81configure:4005: error: in `/var/folders/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118174942.13224/Python-3.6.9': 82configure:4007: error: C compiler cannot create executables 83See `config.log' for more details 84 85 86(中略) 87 88## ----------- ## 89## confdefs.h. ## 90## ----------- ## 91 92/* confdefs.h */ 93#define _GNU_SOURCE 1 94#define _NETBSD_SOURCE 1 95#define __BSD_VISIBLE 1 96#define _BSD_TYPES 1 97#define _DARWIN_C_SOURCE 1 98 99configure: exit 77 100

補足情報(FW/ツールのバージョンなど)

pyenv 1.2.15
Mac Mojave 10.14.6

初心者なので丁寧に教えていただけると助かります

ここにより詳細な情報を記載してください。

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

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

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

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

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

tetsunosuke

2019/11/18 06:47

See `config.log' for more details とありますので、そのファイルの中身も提示すると良いと思います。 ちなみに、 下記のメッセージでGoogle等で検索するといくつか原因っぽいものが見つかると思いますが、そのあたりで対処してみてもいいかもしれません configure: error: C compiler cannot create executables
退会済みユーザー

退会済みユーザー

2019/11/18 06:51

ご回答ありがとうございます。 質問文にもファイルの検索を行ったのですが、該当するものを見つけることができませんでした。 どこらへんに入っているまたはこう検索すると出てくるなどの案はありますでしょうか? また、Googleで上記内容の検索も行いました。 ですが自分の思うような解決策にたどり着くことができず、こちらでみなさまのお力添えをお願いしたいと思い質問させていただきました。 よろしくお願いいたします。
tetsunosuke

2019/11/18 06:57

あ、 > とあるサイトの通りにconfig.logの検索を行ったがそれらしいものは見つからなかった 見落としました。失礼。 おそらく、この行にでている、 configure: error: in /var/folders/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118152620.11029/Python-3.6.9' のフォルダにあると思います。 私が成功したときのログですが、 /private/folders/31/yt3v30m15kb0p9dl24hb8r8h0000gp/T/python-build.20191118155347.51532/Python-3.6.9/config.log ここにありました。
退会済みユーザー

退会済みユーザー

2019/11/18 07:27

ありがとうございます。無事に発見することができましたが未だ自己解決にはいたりませんでした。 追記させていただいたので、ご確認ください
tetsunosuke

2019/11/18 07:42

configure:3958: clang -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl@1.1/include -I/Users/user/.pyenv/versions/3.6.9/include -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl@1.1/lib -L/Users/user/.pyenv/versions/3.6.9/lib conftest.c >&5 dyld: Library not loaded: @rpath/libtapi.dylib Referenced from: /Library/Developer/CommandLineTools/usr/bin/ld Reason: image not found ここがどうやらキモっぽいですね。 下記に似たようなのが見つかったのですが、どうかな・・・ https://teratail.com/questions/179205
退会済みユーザー

退会済みユーザー

2019/11/18 08:54 編集

ありがとうございます。 教えていただいたリンクと同じようにanacondaを優先していたのでサイトの通りにwhich curlの結果が/usr/bin/curlにすることができましたが、未だ以下のようなエラーが出てしまいました ## ----------- ## ## Core tests. ## ## ----------- ## configure:2801: checking build system type configure:2815: result: x86_64-apple-darwin18.7.0 configure:2835: checking host system type configure:2848: result: x86_64-apple-darwin18.7.0 configure:2878: checking for python3.6 configure:2894: found /usr/local/bin/python3.6 configure:2905: result: python3.6 configure:3005: checking for --enable-universalsdk configure:3052: result: no configure:3075: checking for --with-universal-archs configure:3090: result: no configure:3240: checking MACHDEP configure:3449: result: darwin configure:3470: checking for --without-gcc configure:3493: result: no configure:3496: checking for --with-icc configure:3516: result: no configure:3640: checking for gcc configure:3667: result: clang configure:3896: checking for C compiler version configure:3905: clang --version >&5 Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin configure:3916: $? = 0 configure:3905: clang -v >&5 Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin Found CUDA installation: /usr/local/cuda, version unknown configure:3916: $? = 0 configure:3905: clang -V >&5 clang: error: unsupported option '-V -Wno-atomic-implicit-seq-cst' clang: error: no input files configure:3916: $? = 1 configure:3905: clang -qversion >&5 clang: error: unknown argument '-qversion', did you mean '--version'? clang: error: no input files configure:3916: $? = 1 configure:3936: checking whether the C compiler works configure:3958: clang -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl@1.1/include -I/Users/user/.pyenv/versions/3.6.9/include -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl@1.1/lib -L/Users/user/.pyenv/versions/3.6.9/lib conftest.c >&5 dyld: Library not loaded: @rpath/libtapi.dylib Referenced from: /Library/Developer/CommandLineTools/usr/bin/ld Reason: image not found clang: error: unable to execute command: Abort trap: 6 clang: error: linker command failed due to signal (use -v to see invocation) configure:3962: $? = 254 configure:4000: result: no configure: failed program was: | /* confdefs.h */ | #define _GNU_SOURCE 1 | #define _NETBSD_SOURCE 1 | #define __BSD_VISIBLE 1 | #define _BSD_TYPES 1 | #define _DARWIN_C_SOURCE 1 | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:4005: error: in `/var/folders/1w/n7_6cwys5c77hdvrl8v_r6ym0000gn/T/python-build.20191118174942.13224/Python-3.6.9': configure:4007: error: C compiler cannot create executables See `config.log' for more details
guest

回答1

0

ベストアンサー

https://github.com/pyenv/pyenv/wiki/Common-build-problems

上記のサイトを参考に無事解決できました。ありがとうございました

投稿2019/11/18 14:41

退会済みユーザー

退会済みユーザー

総合スコア0

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

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

tetsunosuke

2019/11/19 00:13

解決に直結するアドバイスができなくてすみませんでした 差し支えなければ具体的にどのように解決したのか教えてもらえますか?(提示のあるURLのどの方法を試しましたか?)
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問