LoginSignup
0
0

More than 5 years have passed since last update.

Centos6.5にpython2.7を入れたメモ

Posted at

Coetos6.5にpython2.7をインストールする時必要があったので、
http://qiita.com/Kodaira_/items/feadfef9add468e3a85b
を参考に導入してみました。

事前に必要なパッケージ

$ yum install gcc
$ yum install bzip2-devel
$ yum install zlib-devel
$ yum install gcc
$ yum install -y sqlite-devel.i686

pyenvのインストール

gitからCloneしてくる。

$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv

で、(~/.bash_profile)に以下を追記

export PYENV_ROOT=$HOME/.pyenv
export PATH=$PYENV_ROOT/bin:$PATH
eval "$(pyenv init -)"

ここまででインストール一旦完了

特定のバージョンのインストール

$ pyenv install 2.7.9

■2.7に切り替える

$ python --version
$ Python 2.6.6
$ pyenv shell 2.7.9
$ python --version
$ Python 2.7.9

こうすると、systemのPythonを使用する。

$ pyenv shell system
$ python --version
$ Python 2.6.6
0
0
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
0
0