3.2 ์ค์น์ pyenv install
๋ช
๋ น์ด ์คํจํ์ง๋ง 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 ์ ํจ์น๋ฅผ ์ถ๊ฐํ์ต๋๋ค.
ํ
์ต์ ๋ง์คํฐ๋ก ์ฌ ๊ตฌ์ถ์ ์๋ํ์ญ์์ค.
ํ
๊ฑฐ๊ธฐ ์๋?
๋ด ์ปดํจํฐ์์ ๋น๋ ๋ฌธ์ ๊ฐ ์์ ๋์์์ ํ์ธํ๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ซ์ต๋๋ค.
๋๋ ๊ฐ์ ๋ฌธ์ ๋ฅผ ๊ฐ์ง๊ณ ์๋ค. ์์ง ์์ ๋์ง ์์์ต๋๋ค.
homebrew๋ฅผ ํตํด openssl์ ์ค์นํ๋ ค๊ณ ์๋ํ์ง๋ง ๋ฌธ์ ๊ฐ ์ง์๋ฉ๋๋ค.
๋ฟก ๋นต๋จ
openssl ๋ฌธ์ ๋ฅผ ๋ง๋ Python ๋ฒ์ ์ ๋ฌด์์
๋๊น? pyenv install --verbose ${version}
์ ์ค์ ์ถ๋ ฅ์ ์์ ์ผ๋ก ๋ณด์ฌ์ฃผ์ธ์.
@yyuu ๋ฒ์ ์ 3.3.2์ ๋๋ค. ์ฌ๊ธฐ์ ๋ก๊ทธ๊ฐ ์์ต๋๋ค.
๋ฟก ๋นต๋จ
ํ ... ์ข ์ด์ํด ๋ณด์ด๋ค์ :(
CPython 3.3.2์ ssl
๋ชจ๋ ๋น๋ ๋ฌธ์ ๋ ๋ ๋ค๋ฅธ ๋ฌธ์ ์
๋๋ค. CPython 3.2์ ๋ฌธ์ ๋ OpenSSL์ ์ต๊ทผ ๋ณ๊ฒฝ์ผ๋ก ์ธํด ๋ฐ์ํ์ต๋๋ค (SSLv2์ ๋ํ ์ง์์ด ์ค๋จ๋จ).
CPython 3.3.2๋ ๋งค์ฐ ์๋กญ๊ณ ๊ธฐ๋ณธ์ ์ผ๋ก ๋์ผํ ์์ ์ฌํญ์ด ์ ์ฉ๋์์ง๋ง ์ด๋ ๋ฌธ์ ๊ฐ๋์ง ์์ต๋๋ค.
๋ ๋ง์ ์กฐ์ฌ๋ฅผ ์ํด ๊ทํ์ ๋ฌธ์ ์ ๋ํ ๋ ๋ค๋ฅธ ๋ฌธ์ ๋ฅผ ๊ฐ๊ณ ์ถ์ต๋๋ค.
์ด ํฐ์ผ์ ํ ๋ฒ ๋ ์ดํด๋ณด๊ณ homebrew๊ฐ ์ค์น๋ openssl์ ์ฌ์ฉํ์ฌ ์ ํ์ด์ฌ์ ์ค์นํ ์ ์์์ต๋๋ค.
๋๊ฐ์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ฌ ๋ค์ ํฐ์ผ์ ์ฐพ์์ต๋๋ค.
$ 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
๊ทธ๋์ 2.7.6 ํ์ผ์ # 22์ ๋ณ๊ฒฝ ์ฌํญ์ผ๋ก ์
๋ฐ์ดํธํ์ง๋ง beck์ ์ต๊ทผ ๋๊ธ๊ณผ ๋์ผํ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ๋๋ ๋จ์ํ ๊ฒ์ ๋์น๊ณ ์๋ค. MacOS Mavericks์์.
"pyenv install 2.7.6"์คํ
@yina ๊ฒฐ๊ตญ ๋๋ homebrew openssl์ ๋ฒ๋ ค์ผํ์ต๋๋ค.
๋๋ฅผ ์ํด ์ผํ ๊ฒฐ๊ณผ :
brew uninstall openssl
brew upgrade pyenv
pyenv install 2.7.6
๊ณ ๋ง์ ๋ฒก. openssl์ด ์ค์น๋ macports๋ฅผ ์ฌ์ฉํ๊ณ ์์์ ๋ช ํํํด์ผํฉ๋๋ค. 2.7.6 ํ์ผ์ ๋ณ๊ฒฝ ํ "pyenv ์ ๋ฐ์ดํธ"๊ฐ ํฌํจ ๋ ์ต์ pyenv๊ฐ ์์ต๋๋ค.
์ด ์ต๊ทผ ์ปค๋ฐ ์ ์ฌ์ฉํ ์์๋ ๊ฒฝ์ฐ openssl์ด ํฌํจ๋๋ ๊ฒ์ฒ๋ผ ๋ณด์ด๋ฏ๋ก sudo port uninstall openssl
์๋ํด ๋ณด๊ฒ ์ต๋๋ค. ๋ค๋ฅธ ํ๋ก์ ํธ์ openssl์ด ํ์ํ ๊ฒฝ์ฐ xcode์ ํจ๊ป ์ ๊ณต๋๋ ๊ฒ์ ์ฌ์ฉํ์ญ์์ค. ๋์์ด ๋์๊ธฐ๋ฅผ ๋ฐ๋๋๋ค
@beck @yina
์ปค๋ฐ 6b0710e263ee92a4ae15822e38b1037775d93609๊ฐ master
์ ๋ณํฉ๋์ง ์์์ต๋๋ค. OS X Mavericks์์ OS X์ ๊ธฐ๋ณธ OpenSSL 0.9.8์ ๋ํ ๋งํฌ๋ก CPython 2.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
Yosemite 10.10.x ๋ฐ homebrew openssl 1.0.2d์์ ์ด์ oneliner๋ฅผ ๋ค์๊ณผ ๊ฐ์ด ๋ณ๊ฒฝํด์ผํ์ต๋๋ค.
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 Capitan 10.11๋ก ์ ๊ทธ๋ ์ด๋ํ์ต๋๋ค.
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
๋ฌธ์ ๊ฐ ์์ต๋๋ค.
์ ๊ทธ๋ ์ด๋ ๋์ El Capitan 10.11์ ์๋ก ์ค์นํ๊ณ ์์ต๋๋ค. ์ํค ๋ฌธ์ ํด๊ฒฐ๊ณผ ๋์ผํ๊ฒ ์์ ๋ชจ๋ ์๋ฃจ์ ์ ์๋ํ์ง๋ง ์ฌ์ ํ ๋์ผํ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
๋ค์์ ์ ์ฒด ์ค๋ฅ์ ๋๋ค (์ํ๋ ๊ฒฝ์ฐ ์์ ์ ์ ์ฒด ๋ก๊ทธ๋ฅผ ๋ฃ์ ์๋ ์์ต๋๋ค).
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
์ฌ๊ธฐ ๊นจ๋ํ El Capitan๊ณผ ๋์ผํ ์ค๋ฅ๊ฐ ์์ต๋๋ค.
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 El Capitan์์ ์ผํ์ต๋๋ค.
$ 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
์ข์! 'Common build problems'wiki, Issues # 448 (copperlight์ ์ ํํ ๋ช ๋ น์ ์๋ํ์ง๋ ์์์ง๋ง), # 451, ๋ชจ๋ ์ฑ๊ณตํ์ง ๋ชปํ ํ channprj์ ์์ ์๋ฃจ์ ์ด ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค. OS 10.11, El Capitan. ๊ฐ์ฌ!
$ brew uninstall openssl
$ brew uninstall --force openssl
$ pyenv ์ค์น 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์ ์ฌ์ฉํ์ฌ ์ ํ์ด์ฌ์ ์ค์นํ ์ ์์์ต๋๋ค.
๋๊ฐ์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ฌ ๋ค์ ํฐ์ผ์ ์ฐพ์์ต๋๋ค.
๋๋ฅผ ์ํด ์ผํ ๊ฒ :