- 安裝 gcc
- Build Python-2.7 (downloads)
- 載入動態資料庫
- install virtualenv
- 利用 virtualenv 建立 python 2.7 的開發環境 (因為 CentOS 6 預設的 python 版本為 2.6,預設的版本最好不要亂改)
- 離開 python 2.7 開發環境
# yum install gcc gcc-c++.x86_64 compat-gcc-34-c++.x86_64 openssl-devel.x86_64 zlib*.x86_64
# wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz # tar zxvf Python-2.7.8.tgz # cd Python-2.7.8 # ./configure --enable-shared # make # make install
# touch /etc/ld.so.conf.d/python2.7.conf # vim /etc/ld.so.conf.d/python2.7.conf /usr/local/lib # ldconfig
# python-pip install virtualenv
# virtualenv fayeENV --python=python2.7 # source fayeENV/bin/activate # python Python 2.7.8 (default, Sep 17 2014, 15:35:06) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
# deactivate
參考資料:
沒有留言:
張貼留言