针对目前本分类(Python实战),笔者需要利用到IPython,对于IPython的介绍:
IPython是Python的加强型交互式解释器。
IPython是使用Python进行数据分析、处理、呈现的重要选择之一。
它是一个与Python科学计算包(主要包括Numpy、pandas、Matplotlib等)紧密联系的交互式开发环境,它同时也是Python科学计算包的一部分。
主要特点包括: 提供给用户一个强大的交互界面。
Jupter Notebook的内核。
高效的交互式处理、呈现数据(特别是与Matplotlib一起使用)。
适合并行处理计算。
IPython加上一个文本编辑器是科学计算者使用Python进行数据分析、处理、呈现的最佳选择之一。
那么安装流程:
在Command中键入pip install ipython[all]
,此命令是基本命令应对于
下载ipython在你的系统里。
在使用pip的时候在后面加上-i参数,指定pip源。
那么笔者的键入命令为pip install ipython[all] -i https://mirrors.aliyun.com/pypi/simple
[all] :对于笔记本中用户的权限,all为针对所有用户,即管理员admin和普通用户。
-i :后面的url指向的是中国镜像资源网站,笔者这里的https://mirrors.aliyun.com/pypi/simple
为阿里云的国内镜像pip。
笔者也是听他人讲在Command上键入pip
功能链接的镜像资源都是国外官方的,速度比较蜗牛,因此选择国内的镜像速度比较乐观,-i
后跟上的url为国内镜像资源链接。
而对于永久修改指定源:
WINDOWS版本:
在系统盘中的user目录中创建一个pip目录,并新建文件pip.ini。
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
LINUX版本:
修改 ~/.pip/pip.conf ,可以自行创建。
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
那么继续过程:
Cache entry deserialization failed, entry ignored
Could not find a version that satisfies the requirement numpy; extra == "all" (from ipython[all]) (from versions: )
No matching distribution found for numpy; extra == "all" (from ipython[all])
初次在一个干净没有任何附加第三方库的环境情况下,缺失numpy科学库安装IPython的过程中出现错误,那么我们先安装numpy:
pip install numpy
安装numpy成功之后,我们再进行IPython的安装,键入命令如上面所述:
Installing collected packages: pygments, colorama, parso, jedi, ipython-genutils, six, decorator, traitlets, wcwidth, prompt-toolkit, pickleshare, backcall, win-unicode-console, jupyter-core, tornado, pyzmq, python-dateutil, jupyter-client, ipykernel, qtconsole, testpath, chardet, urllib3, certifi, idna, requests, alabaster, pyparsing, packaging, sphinxcontrib-websupport, MarkupSafe, Jinja2, snowballstemmer, docutils, pytz, babel, imagesize, Sphinx, nose, jsonschema, nbformat, ipyparallel, prometheus-client, Send2Trash, pywinpty, terminado, entrypoints, webencodings, bleach, pandocfilters, mistune, defusedxml, nbconvert, notebook, widgetsnbextension, ipywidgets, ipython
Running setup.py install for backcall ... done
Running setup.py install for win-unicode-console ... done
Running setup.py install for prometheus-client ... done
Running setup.py install for pandocfilters ... done
Successfully installed Jinja2-2.10 MarkupSafe-1.1.0 Send2Trash-1.5.0 Sphinx-1.8.2 alabaster-0.7.12 babel-2.6.0 backcall-0.1.0 bleach-3.0.2 certifi-2018.11.29 chardet-3.0.4 colorama-0.4.1 decorator-4.3.0 defusedxml-0.5.0 docutils-0.14 entrypoints-0.2.3 idna-2.8 imagesize-1.1.0 ipykernel-5.1.0 ipyparallel-6.2.3 ipython-7.2.0 ipython-genutils-0.2.0 ipywidgets-7.4.2 jedi-0.13.2 jsonschema-2.6.0 jupyter-client-5.2.4 jupyter-core-4.4.0 mistune-0.8.4 nbconvert-5.4.0 nbformat-4.4.0 nose-1.3.7 notebook-5.7.2 packaging-18.0 pandocfilters-1.4.2 parso-0.3.1 pickleshare-0.7.5 prometheus-client-0.5.0 prompt-toolkit-2.0.7 pygments-2.3.0 pyparsing-2.3.0 python-dateutil-2.7.5 pytz-2018.7 pywinpty-0.5.5 pyzmq-17.1.2 qtconsole-4.4.3 requests-2.21.0 six-1.12.0 snowballstemmer-1.2.1 sphinxcontrib-websupport-1.1.0 terminado-0.8.1 testpath-0.4.2 tornado-5.1.1 traitlets-4.3.2 urllib3-1.24.1 wcwidth-0.1.7 webencodings-0.5.1 widgetsnbextension-3.4.2 win-unicode-console-0.5
这个时候说明IPython已经成功安装在电脑中。