Created
October 23, 2017 07:55
-
-
Save kentarosasaki/dbf919df1481ba67ac3d4cd0f9652b62 to your computer and use it in GitHub Desktop.
pyenv を使って CentOS 5 に Python 3 をインストールする方法 ref: http://qiita.com/kentarosasaki/items/d7c492a38329f1b0f948
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum -y install gcc make readline readline-devel zlib zlib-devel bzip2 bzip2-devel sqlite sqlite-devel openssl openssl-devel git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone git://github.com/yyuu/pyenv.git ~/.pyenv | |
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile | |
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile | |
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile | |
$ exec "$SHELL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pyenv install --list | |
Available versions: | |
2.1.3 | |
... | |
3.5.4 | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ CFLAGS=-I/usr/include/openssl LDFLAGS=-L/usr/lib64 pyenv install -v 3.5.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pyenv versions | |
* system | |
3.5.4 (set by /home/user/.pyenv/version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pyenv global 3.5.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pyenv versions | |
system | |
* 3.5.4 (set by /home/user/.pyenv/version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python -V | |
Python 3.5.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment