LoginSignup
21
16

More than 5 years have passed since last update.

pyenvにおけるpythonインストールエラー対処法(BUILD FAILED)

Last updated at Posted at 2015-06-11

pyenvのインストール

インストール方法は色々な方が解説されているのでそちらを参照しました。

インストールエラー

内容

pyenvをインストールし、パスを通し終え、いよいよpythonをインストールしようと喜び勇んで$ pyenv install 3.4.3を実行したところ以下のエラーが発生しました。

$ pyenv install 3.4.3 

Downloading Python-3.4.3.tgz...

-> https://yyuu.github.io/pythons/4281ff86778db65892c05151d5de738d

Installing Python-3.4.3...

ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.

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

BUILD FAILED (OS X 10.10.3 using python-build 20141028)

Inspect or clean up the working tree at /var/folders/yy/9bhhz0216dz7vbz5_1ffbl5m0000gn/T/python-build.20150610141204.31062

Results logged to /var/folders/yy/9bhhz0216dz7vbz5_1ffbl5m0000gn/T/python-build.20150610141204.31062.log

Last 10 log lines:

(cd /Users/[ユーザ名]/.pyenv/versions/3.4.3/share/man/man1; ln -s python3.4.1 python3.1)
if test "xupgrade" != "xno"  ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python.exe -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Ignoring ensurepip failure: pip 6.0.8 requires SSL/TLS

対処法

xcode command line developer toolsをインストールすれば解決しました。もともと入っている人はこのエラーは発生しないのだと思います。
具体的にはターミナルで以下を実行
$ xcode-select --install

するとインストールの確認窓が立ち上がるので、指示に従いインストールします。
そして再びインストールを試みます。

$ pyenv install 3.4.3   

Downloading Python-3.4.3.tgz...

-> https://yyuu.github.io/pythons/4281ff86778db65892c05151d5de738d

Installing Python-3.4.3...

Installed Python-3.4.3 to /Users/[ユーザ名]/.pyenv/versions/3.4.3

エラーは起こっていません。
インストールされたpythonのリストを表示してみます。

$ pyenv versions
* system (set by /Users/[ユーザ名]/.pyenv/version)
  3.4.3

上手くインストール出来ました!

参考

-http://o-tomox.hatenablog.com/entry/2014/09/22/174315

21
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
16