2017-06-12 153 views
1

的「[筆記本]」似乎是某種改性劑,但不是IPython的我突然在想,因爲我是在安裝Jupyter什麼此修改器我已經錯過了,或許一些會安裝特定的其他變種內核或配置。什麼是在「[筆記本]」「PIP安裝IPython的[筆記本]」是什麼意思?

不幸的是,我不知道'[notebook]'是什麼:pip search '[notebook]'找不到任何東西,我不知道這個修飾符是什麼或被調用。我已經看過PyPI命名約定pep等,但是我找不到任何引用'[']'符號的東西。

我沒有看到任何標識的安裝後,可以幫助我確定我已經安裝了這個特殊的修改?

osmith:~ oliver.smith$ pip3 install ipython[notebook] 
Requirement already satisfied: ipython[notebook] in /usr/local/lib/python3.6/site-packages 
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: pexpect; sys_platform != "win32" in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: decorator in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: jedi>=0.10 in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: appnope; sys_platform == "darwin" in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: pygments in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: pickleshare in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: ipywidgets; extra == "notebook" in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: notebook; extra == "notebook" in /usr/local/lib/python3.6/site-packages (from ipython[notebook]) 
Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython[notebook]) 
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.6/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython[notebook]) 
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.6/site-packages (from pexpect; sys_platform != "win32"->ipython[notebook]) 
Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.6/site-packages (from traitlets>=4.2->ipython[notebook]) 
Requirement already satisfied: widgetsnbextension~=2.0.0 in /usr/local/lib/python3.6/site-packages (from ipywidgets; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/lib/python3.6/site-packages (from ipywidgets; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.6/site-packages (from ipywidgets; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: terminado>=0.3.3; sys_platform != "win32" in /usr/local/lib/python3.6/site-packages (from notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: jupyter-client in /usr/local/lib/python3.6/site-packages (from notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: tornado>=4 in /usr/local/lib/python3.6/site-packages (from notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: jinja2 in /usr/local/lib/python3.6/site-packages (from notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: jupyter-core in /usr/local/lib/python3.6/site-packages (from notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: nbconvert in /usr/local/lib/python3.6/site-packages (from notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/lib/python3.6/site-packages (from nbformat>=4.2.0->ipywidgets; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/site-packages (from jupyter-client->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.6/site-packages (from jupyter-client->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.6/site-packages (from jinja2->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: mistune!=0.6 in /usr/local/lib/python3.6/site-packages (from nbconvert->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.6/site-packages (from nbconvert->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: bleach in /usr/local/lib/python3.6/site-packages (from nbconvert->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.6/site-packages (from nbconvert->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: testpath in /usr/local/lib/python3.6/site-packages (from nbconvert->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: html5lib>=0.99999999 in /usr/local/lib/python3.6/site-packages (from bleach->nbconvert->notebook; extra == "notebook"->ipython[notebook]) 
Requirement already satisfied: webencodings in /usr/local/lib/python3.6/site-packages (from html5lib>=0.99999999->bleach->nbconvert->notebook; extra == "notebook"->ipython[notebook]) 
osmith:~ oliver.smith$ pip3 show ipython 
Name: ipython 
Version: 6.1.0 
Summary: IPython: Productive Interactive Computing 
Home-page: https://ipython.org 
Author: The IPython Development Team 
Author-email: [email protected] 
License: BSD 
Location: /usr/local/lib/python3.6/site-packages 
Requires: jedi, prompt-toolkit, pygments, traitlets, pexpect, simplegeneric, pickleshare, setuptools, appnope, decorator 
osmith:~ oliver.smith$ pip3 show ipython[notebook] 
osmith:~ oliver.smith$ 

回答

2

方括號表示正常情況下不安裝臨時演員。

此鏈接解釋說,在細節: https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-dependencies

此鏈接詳細解釋了要求符,並列出了方括號作爲一個選項: https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers

+2

除了這個一般的答案,我想給一個指針爲[IPython的的setup.py](https://github.com/ipython/ipython/blob/master/setup.py#L174)其中這些'extras_require'被列出。安裝'ipython [notebook]'意味着'pip安裝筆記本'和'... ipywidgets'。 – phd

相關問題