本文介绍了为什么pip需要一个感叹号才能在iPython中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
一个简单的例子,键入pip list
不起作用,但是!pip list
起作用.关于惊叹号和在ipython shell中使用模块有一些语法吗?
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 the ipython shell?
推荐答案
这实际上并非特定于pip
,而是iPython笔记本中的任何shell分配.您会注意到其他shell命令也有效(来自文档):
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/
更改目录:
In[1]: !cd /var/etc
这只是Jupyter的好人包括的简写形式.请参阅文档中的 Shell分配以了解更多的解释.
This is simply shorthand that the good folks at Jupyter have included. See Shell Assignment in the docs for more of an explanation.
这篇关于为什么pip需要一个感叹号才能在iPython中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!