Why does pip need an exclamation point to use in iPython?

前端 未结 1 1729

Just a quick example, typing pip list doesn\'t work but !pip list does. Is there some syntax regarding the exclamation point and using modules in t

1条回答
  •  半阙折子戏
    2020-12-06 19:18

    This is actually not specific to pip, but really any shell assignment from the iPython notebook. You'll notice other shell commands also work (from the docs):

    In[1]: !pwd
    /User/home/
    

    Change directory:

    In[1]: !cd /var/etc
    

    This is simply shorthand that the good folks at Jupyter have included. See Shell Assignment in the docs for more of an explanation.

    0 讨论(0)
提交回复
热议问题