Python學習筆記-編譯安裝Python3.6.1 + iPython
阿新 • • 發佈:2017-06-13
python
由於系統已有2.6的python,最好不好修改系統的版本,使用編譯安裝
下載Python3.6.1包
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
安裝依賴:
yum -y install readline-devel
解壓Python-3.6.1.tar.xz
xz -d Python-3.6.1.tar.xztar -xvf Python-3.6.1.tar
編譯安裝,指定/usr/local/python361目錄
cd Python-3.6.1./configure --prefix=/usr/local/python361make && make install
創建軟鏈接
[[email protected] bin]# ln -s /usr/local/python361/bin/python3.6 /usr/bin/python36
安裝ipython,使用國內豆瓣源,速度快。
python36 -m easy_install -i http://pypi.douban.com/simple/ ipython
測試ipython
[[email protected] ~]# ipython /usr/local/python361/lib/python3.6/site-packages/ipython-6.1.0-py3.6.egg/IPython/core/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved warn("IPython History requires SQLite, your history will not be saved") Python 3.6.1 (default, Jun 1 2017, 11:21:44) Type ‘copyright‘, ‘credits‘ or ‘license‘ for more information IPython 6.1.0 -- An enhanced Interactive Python. Type ‘?‘ for help. In [1]:
本文出自 “謝育政” 博客,請務必保留此出處http://kurolz.blog.51cto.com/11433546/1935018
Python學習筆記-編譯安裝Python3.6.1 + iPython