pyenv install
コマンドは、3.2のインストール時に失敗しますが、3.2.5および3.1.5では成功します。
ubuntu<strong i="7">@box144</strong>:~$ pyenv install 3.1.5
Downloading Python-3.1.5.tgz...
-> http://www.python.org/ftp/python/3.1.5/Python-3.1.5.tgz
Installing Python-3.1.5...
Installed Python-3.1.5 to /home/ubuntu/.pyenv/versions/3.1.5
Downloading distribute-0.6.40.tar.gz... [...]
Downloading pip-1.3.1.tar.gz... [...]
ubuntu<strong i="8">@box144</strong>:~$ pyenv install 3.2.5
Downloading Python-3.2.5.tgz...
-> http://yyuu.github.io/pythons/ed8d5529d2aebc36b53f4e0a0c9e6728
Installing Python-3.2.5...
Installed Python-3.2.5 to /home/ubuntu/.pyenv/versions/3.2.5
Downloading distribute-0.6.40.tar.gz... [...]
Downloading pip-1.3.1.tar.gz... [...]
ubuntu<strong i="9">@box144</strong>:~$ pyenv install 3.2
Downloading Python-3.2.tgz...
-> http://yyuu.github.io/pythons/5efe838a7878b170f6728d7e5d7517af
Installing Python-3.2...
BUILD FAILED
Inspect or clean up the working tree at /tmp/python-build.20130522214215.31234
Results logged to /tmp/python-build.20130522214215.31234.log
Last 10 log lines:
File "<string>", line 2, in <module>
File "/home/ubuntu/.pyenv/versions/3.2/lib/python3.2/ssl.py", line 60, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named _ssl
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 4, in <module>
ImportError: The Python ssl extension was not compiled. Missing the OpenSSL lib?
これは、最近のバージョンのOpenSSLでのsslモジュールのビルドの問題である可能性があります。 このエラーを防ぐために、 SHA @ 5fbc3ae3d5629081507b691a3549007cff1cffc6にパッチを追加しました。
@notnoop
最新のマスターで再構築してみてください。
@notnoop
あなたはそこにいませんか?
自分のマシンでビルドの問題が修正されたことを確認したので、これを閉じます。
私は同じ問題を抱えています。 まだ修正されていません。
homebrew経由でopensslをインストールしようとしましたが、問題は解決しません。
@Rnhmjoj
どのバージョンのPythonでopensslの問題に遭遇しましたか? pyenv install --verbose ${version}
の実際の出力を要点として見せてください。
@yyuuバージョンはバージョン:3.3.2です。 これがログです。
@Rnhmjoj
うーん...少し奇妙に見えます:(
CPython 3.3.2のssl
モジュールのビルドの問題は別の問題である必要があります。 CPython 3.2の問題は、OpenSSLの最近の変更が原因で発生しました(SSLv2のサポートが終了します)。
CPython 3.3.2は非常に新しく、同等の修正がデフォルトで適用されていますが、これは問題ではないはずです。
さらに調査するために、あなたの問題について別の問題があります。
このチケットをもう一度調べることをお勧めします。homebrewがインストールされたopensslで新しいpythonをインストールできませんでした。
まったく同じ問題に遭遇し、このチケットを見つけました:
$ brew upgrade pyenv
Error: pyenv-20140211 already installed
$ pyenv install 2.7.4
....
BUILD FAILED
Inspect or clean up the working tree at /var/folders/3y/7jrv6jr95fnbs9rr0vx1xwzc0000gn/T/python-build.20140212160358.97455
Results logged to /var/folders/3y/7jrv6jr95fnbs9rr0vx1xwzc0000gn/T/python-build.20140212160358.97455.log
Last 10 log lines:
File "<string>", line 1, in <module>
File "/Users/doug/.pyenv/versions/2.7.4/lib/python2.7/ssl.py", line 60, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named _ssl
The Python ssl extension was not compiled. Missing the OpenSSL lib?
私のために働いたこと:
$ CFLAGS="-I$(brew --prefix openssl)/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib" \
pyenv install 2.7.4
そのため、#22の変更で2.7.6ファイルを更新しましたが、beckからの最新のコメントと同じエラーが発生します。 簡単なものが足りないのでしょうか。 MacOSMavericksで。
「pyenvinstall2.7.6」を実行するだけです
@yina結局、私は自作のopensslを捨てなければなり
何が私のために働いたのか:
brew uninstall openssl
brew upgrade pyenv
pyenv install 2.7.6
ベックありがとう。 opensslがインストールされているmacportsを使用していることを明確にする必要があります。 2.7.6ファイルに加えた変更を加えた「pyenvupdate」を備えた最新のpyenvがあります。
この最近のコミットは、opensslが利用できない場合は含まれるように見えるので、 sudo port uninstall openssl
を試してみます。 また、他のプロジェクトでopensslが必要な場合は、xcodeで提供されているものを使用してください。 お役に立てれば
@beck @yina
コミット6b0710e263ee92a4ae15822e38b1037775d93609はmaster
マージされていません。 OS XMavericksでOSXのデフォルトのOpenSSL0.9.8に対してリンクしてCPython2.7.6を構築できるので、それをマージする必要があるのだろうか。
詳細情報を教えてください:
Command Line Tools for Xcode
インストールしていますか?which cc; cc -v
確認できますCFLAGS
、 LDFLAGS
、およびCPPFLAGS
の環境変数pyenv install -v 2.7.6 2>&1 | tee build.log
からの出力@yyuuいくつかのコメントの後、ビルド環境について詳しく調べました。LDFLAGSとCPPFLAGSを正しく指定しなかったため、機能しませんでした。 LDFLAGSとCPPFLAGSをに更新しました
export LDFLAGS="-L/opt/local/lib"
export CPPFLAGS="-I/opt/local/include"
そして走った
pyenv install -v 2.7.6
そしてそれはうまくいきました! ありがとうございました!
:その後:
:おめでとう:
beckの修正も機能しましたが、brewのopensslを使用しました
CFLAGS = "-I $(brew --prefix openssl)/ include" \
LDFLAGS = "-L $(brew --prefix openssl)/ lib" \
pyenvインストール2.7.4
Yosemite10.10.xとhomebrewopenssl 1.0.2dでは、以前のワンライナーを次のように変更する必要がありました。
LDFLAGS="-L$(brew --prefix openssl)/lib" CPPFLAGS="-I$(brew --prefix openssl)/include" pyenv install 2.7.10
現在、CFLAGSの代わりにCPPFLAGSを使用する必要があるようです。
私の場合、openssl、zlib、sqlite3のLDFLAGSとCPPFLAGSを含める必要がありました。
zlibとopensslをリンクするコマンドは私のために働きます: CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib" CPPFLAGS="-I$(brew --prefix openssl)/include" pyenv install -v 3.5.0
El Capitan10.11にアップグレードします。
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
でもこの問題が発生しています
アップグレードではなく、El Capitan10.11のクリーンインストールを実行しています。 上記のすべての解決策を試しましたが、wikiのトラブルシューティングと同じですが、それでも同じエラーが発生します。
これが完全なエラーです(必要に応じて、完全なログを要点に入れることもできます):
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.11 using python-build 20150818)
Inspect or clean up the working tree at /var/folders/0f/z22q_whs0v30pr8lg6b_jfxr0000gn/T/python-build.20151003143338.30855
Results logged to /var/folders/0f/z22q_whs0v30pr8lg6b_jfxr0000gn/T/python-build.20151003143338.30855.log
Last 10 log lines:
rm -f /Users/gabo/.pyenv/versions/2.7.10/share/man/man1/python.1
(cd /Users/gabo/.pyenv/versions/2.7.10/share/man/man1; ln -s python2.1 python.1)
if test "xno" != "xno" ; then \
case no in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python.exe -E -m ensurepip \
$ensurepip --root=/ ; \
fi
ここできれいなエルキャピタンと同じエラー:
Stefans-MBP:~ stefan$ pyenv install 3.4.3
Downloading readline-6.3.tar.gz...
-> https://yyuu.github.io/pythons/56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
Installing readline-6.3...
Installed readline-6.3 to /Users/stefan/.pyenv/versions/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.11 using python-build 20150818)
Inspect or clean up the working tree at /var/folders/v5/rk06g5z94txf2fglhrk9b3y40000gn/T/python-build.20151004141807.591
Results logged to /var/folders/v5/rk06g5z94txf2fglhrk9b3y40000gn/T/python-build.20151004141807.591.log
Last 10 log lines:
(cd /Users/stefan/.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
@MrLeehそれはエルキャピタンで働いた。
$ xcode-select --install
$ brew uninstall openssl
$ pyenv install 3.4.0
Downloading openssl-1.0.1p.tar.gz...
-> https://yyuu.github.io/pythons/bd5ee6803165c0fb60bbecbacacf244f1f90d2aa0d71353af610c29121e9b2f1
Installing openssl-1.0.1p...
Installed openssl-1.0.1p to /Users/CHANN/.pyenv/versions/3.4.0
Downloading Python-3.4.0.tgz...
-> https://yyuu.github.io/pythons/d2c83ea0217769a73e8b1ee33ffbca814903f8568e30f8d13e68e3d1f743449c
Installing Python-3.4.0...
Installed Python-3.4.0 to /Users/CHANN/.pyenv/versions/3.4.0
いいね! 「一般的なビルドの問題」ウィキ、Issue#448(copperlightの正確なコマンドは試していませんが)、#451から他のすべてを試した後、すべて成功しませんでしたが、channprjの上記の解決策はうまくいきました。 OS 10.11、ElCapitan。 ありがとう!
$ brewアンインストールopenssl
$ brew uninstall --force openssl
$ pyenv install 2.7.10
openssl-1.0.1p.tar.gzをダウンロードしています...
-> https://yyuu.github.io/pythons/bd5ee6803165c0fb60bbecbacacf244f1f90d2aa0d71353af610c29121e9b2f1
openssl-1.0.1pをインストールしています...
openssl-1.0.1pを/Users/tylerarbour/.pyenv/versions/2.7.10にインストールしました
Pythonのダウンロード-2.7.10.tgz ...
-> https://yyuu.github.io/pythons/eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a
Python-2.7.10をインストールしています...
パッチファイル./Lib/site.py
Python-2.7.10を/Users/tylerarbour/.pyenv/versions/2.7.10にインストールしました
最も参考になるコメント
このチケットをもう一度調べることをお勧めします。homebrewがインストールされたopensslで新しいpythonをインストールできませんでした。
まったく同じ問題に遭遇し、このチケットを見つけました:
私のために働いたこと: