Python學習筆記-編譯安裝Python3.6.1 + iPython

來源:互聯網
上載者:User

標籤: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 informationIPython 6.1.0 -- An enhanced Interactive Python. Type ‘?‘ for help.In [1]:




 


本文出自 “謝育政” 部落格,請務必保留此出處http://kurolz.blog.51cto.com/11433546/1935018

Python學習筆記-編譯安裝Python3.6.1 + iPython

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.