Centos7下python3安裝ipython


一、通過壓縮包安裝ipython

1、下載ipython安裝包

[root@localhost ~]# wget https://pypi.python.org/packages/79/63/b671fc2bf0051739e87a7478a207bbeb45cfae3c328d38ccdd063d9e0074/ipython-6.1.0.tar.gz#md5=1e15e1ce3f3f722da6935d7ac0e51346

2、安裝ipython

[root@localhost ~]# tar xf ipython-6.1.0.tar.gz
[root@localhost ~]# cd ipython-6.1.0
[root@localhost ipython-6.1.0]# pwd
/root/ipython-6.1.0
[root@localhost ipython-6.1.0]# python3 setup.py install
#前提已安裝python3,
#linux系統安裝python3: http://www.cnblogs.com/chengd/p/7078498.html

3、通過pip安裝ipython所有缺失模塊,直至ipython運行成功

[root@localhost ~]# ipython
Traceback (most recent call last):
  File "/usr/local/bin/ipython", line 4, in <module>
    from IPython import start_ipython
  File "/usr/local/lib/python3.6/site-packages/IPython/__init__.py", line 54, in <module>
    from .core.application import Application
  File "/usr/local/lib/python3.6/site-packages/IPython/core/application.py", line 23, in <module>
    from traitlets.config.application import Application, catch_config_error
ModuleNotFoundError: No module named 'traitlets'
#運行ipython是提示缺少'traitlets'模塊;
#安裝提示一步步通過pip安裝缺失模塊
[root@localhost ~]# pip install 'traitlets'
Collecting traitlets
  Downloading traitlets-4.3.2-py2.py3-none-any.whl (74kB)
    100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 81kB 87kB/s 
Collecting six (from traitlets)
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting ipython-genutils (from traitlets)
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting decorator (from traitlets)
  Downloading decorator-4.0.11-py2.py3-none-any.whl
Installing collected packages: six, ipython-genutils, decorator, traitlets
Successfully installed decorator-4.0.11 ipython-genutils-0.2.0 six-1.10.0 traitlets-4.3.2
......

二、直接通過pip安裝ipython

pip安裝地址:http://www.cnblogs.com/chengd/p/7078588.html

[root@localhost pip-9.0.1]# pip install ipython
[root@localhost pip-9.0.1]# ipython
ipython   ipython3  
[root@localhost pip-9.0.1]# ipython3
/usr/local/lib/python3.6/site-packages/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 26 2017, 09:16:04) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: 
#ipython安裝成功

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM