python-環境準備python,ipython

來源:互聯網
上載者:User

標籤:環境準備python   ipython   

Python-2.7.6和ipython-1.2.1編譯安裝

[[email protected] ~]# ls
anaconda-ks.cfg  Documents  install.log         ipython-1.2.1.tar.gz  Pictures  Python-2.7.6         Templates
Desktop          Downloads  install.log.syslog  Music                 Public    Python-2.7.6.tar.xz  Videos
[[email protected] ~]#


[[email protected] Python-2.7.6]# /usr/local/python27/bin/python2.7
Python 2.7.6 (default, Mar 26 2017, 17:50:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()  (退出)


通過python編譯安裝ipython-1.2.1(python模組)

[[email protected] ipython-1.2.1]# /usr/local/python27/bin/python2.7 setup.py build

[[email protected] ipython-1.2.1]# /usr/local/python27/bin/python2.7 setup.py install

[[email protected] ipython-1.2.1]# ls /usr/local/python27/bin/
2to3  ipcluster     ipengine  iptest   irunner  pydoc   python2    python2.7-config  python-config
idle  ipcontroller  iplogger  ipython  pycolor  python  python2.7  python2-config    smtpd.py
[[email protected] ipython-1.2.1]#


複製連結到/usr/bin

[[email protected] ipython-1.2.1]# ls /usr/local/python27/bin/
2to3  ipcluster     ipengine  iptest   irunner  pydoc   python2    python2.7-config  python-config
idle  ipcontroller  iplogger  ipython  pycolor  python  python2.7  python2-config    smtpd.py
[[email protected] ipython-1.2.1]# ln -sv /usr/local/python27/bin/python2.7 /usr/bin/python
ln: creating symbolic link `/usr/bin/python‘: File exists
[[email protected] ipython-1.2.1]# ln -sv /usr/local/python27/bin/python2.7 /usr/bin/python27
`/usr/bin/python27‘ -> `/usr/local/python27/bin/python2.7‘
[[email protected] ipython-1.2.1]# ln -sv /usr/local/python27/bin/ipython /usr/bin/
`/usr/bin/ipython‘ -> `/usr/local/python27/bin/ipython‘
[[email protected] ipython-1.2.1]# ipython
WARNING: IPython History requires SQLite, your history will not be saved
WARNING: Readline services not available or not loaded.
WARNING: The auto-indent feature requires the readline library
Python 2.7.6 (default, Mar 26 2017, 17:50:22)
Type "copyright", "credits" or "license" for more information.


IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython‘s features.
%quickref -> Quick reference.
help      -> Python‘s own help system.
object?   -> Details about ‘object‘, use ‘object??‘ for extra details.


In [1]: print "hello world"
hello world


In [2]: import platform


In [3]: print platform.       (無法使用tab補全)



ipython環境下按tab鍵、刪除鍵

需要安裝pyreadline




python-環境準備python,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.