yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
mkdir /opt
mkdir /opt/PYTHON
mkdir /opt/PYHTON/2.7.6
mkdir /opt/PYHTON/2.7.6/lib
./configure --prefix=/opt/PYTHON/2.7.6/ --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /optPYTHON/2.7.6/lib"
make && make altinstall
PATHとLD_LIBRARY_PATHを設定する。
export PATH=/opt/PYTHON/2.7.6/bin/:$PATH
export LD_LIBRARY_PATH=/opt/PYTHON/2.7.6/lib/:$LD_LIBRARY_PATH
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python2.7 ez_setup.py
easy_install-2.7 pip
pip2.7 install matplotlib
===
直接関係ないけど、回線が細くて matplotlibのインストールがうまくいなかったので、下記を実施。
matplotlib 1.3.1のソースをダウンロード。
mkdir /tmp/pip_build_root/
cp matplotlib-1.3.1.tar.gz /tmp/pip_build_root/
cd /tmp/pip_build_root/
tar -xvzf matplotlib-1.3.1.tar.gz
ln -fs maptlotlib-1.3.1 matplotlib
cd
pip2.7 install matplotlib --no-download
===
参考
http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/
0 件のコメント:
コメントを投稿