CentOS 7.5下Python 3安装IPython
记录在CentOS 7.5下Python 3安装IPython的过程,希望对大家有所帮助。
一、通过压缩包安装ipython
1、下载IPython安装包
[linuxidc@localhost Linux公社 ]$ wget https://files.pythonhosted.org/packages/82/0a/146b0f0f1ddf13ab8682aed5c5a42250cddf1082e193ec95b50b03b9f791/ipython-7.3.0.tar.gz
2、安装IPython
[root@localhost ~]# tar xf ipython-7.3.0.tar.gz
[root@localhost ~]# cd ipython-7.3.0
[root@localhost ipython-7.3.0]# pwd
/root/ipython-7.3.0
[root@localhost ipython-7.3.0]# python3 setup.py install
#前提已安装python3,
#Linux系统安装Python3 见 :
3、通过pip安装ipython所有缺失模块,直至ipython运行成功
[root@localhost ipython]# 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.7/site-packages/IPython/__init__.py", line 54, in <module>
from .core.application import Application
File "/usr/local/lib/python3.7/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 ipython]# pip install 'traitlets'
Collecting traitlets
Downloading https://files.pythonhosted.org/packages/93/d6/abcb22de61d78e2fc3959c964628a5771e47e7cc60d53e9342e21ed6cc9a/traitlets-4.3.2-py2.py3-none-any.whl (74kB)
100% |████████████████████████████████| 81kB 100kB/s
Requirement already satisfied (use --upgrade to upgrade): enum34; python_version == "2.7" in /usr/lib/python2.7/site-packages (from traitlets)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/site-packages (from traitlets)
Collecting ipython-genutils (from traitlets)
Downloading https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): decorator in /usr/lib/python2.7/site-packages (from traitlets)
Installing collected packages: ipython-genutils, traitlets
Successfully installed ipython-genutils-0.2.0 traitlets-4.3.2
You are using pip version 8.1.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
升级pip
[root@localhost ipython]# pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl (1.4MB)
68% |█████████████████████▉ | 921kB 8.5kB/s eta 0:00:51
100% |████████████████████████████████| 1.4MB 73kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.2
Uninstalling pip-8.1.2:
Successfully uninstalled pip-8.1.2
Successfully installed pip-19.0.3
二、直接通过pip安装ipython
pip安装地址:
[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安装成功
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/server/jiqiao/8819.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
EasyDSS RTMP流媒体服务器运
时间:2021-01-07
-
Linux客户端访问NFS报Permi
时间:2021-01-07
-
MobaXterm中运行脚本出现c
时间:2021-01-07
-
解决启动Nginx出现"'THRE
时间:2020-12-29
-
centeros7的redis-cli命令不生
时间:2020-12-29
-
本地java链接远程服务器
时间:2020-12-29
-
在不重启的情况下为Vmwa
时间:2020-12-28
-
英特尔修复Linux CPU漏洞:
时间:2020-12-28
热门文章
-
4种绕过Linux/Unix命令别名的方法
时间:2020-12-26
-
如何检查你的计算机使用的是UEFI还是BI
时间:2020-12-26
-
在Linux下为X1 Carbon CPU降压
时间:2020-12-26
-
为你的Fedora系统增添发音功能
时间:2020-12-28
-
英特尔修复Linux CPU漏洞:19年前的奔腾3也
时间:2020-12-28
-
使用molly-guard保护你的Linux/Unix机器不会被
时间:2020-12-28
-
解决启动Nginx出现"'THREAD_CONCURRENCY' is d
时间:2020-12-29
-
本地java链接远程服务器Linux上redis出错解
时间:2020-12-29
-
Intel CPU底层漏洞事件完全详解:包括修复
时间:2020-12-28
-
在不重启的情况下为Vmware Linux客户机添加
时间:2020-12-28
