我认为!在IPython中添加一个shell命令会使系统shell实际执行命令,但似乎并非如此.考虑以下内容,我开始使用/home/Documents/Rx,启动IPython,使用命令cd(没有!),然后退出IPython并查看我所在的目录:
$ pwd
/home/Documents/Rx
$ ipython
Python 2.7.11 |Anaconda 2.5.0 (64-bit)| (default, Dec 6 2015, 18:08:32)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.3 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: cd Papers/
/home/Documents/Rx/Papers
In [2]: pwd
Out[2]: u'/home/Documents/Rx/Papers'
In [3]: exit() …Run Code Online (Sandbox Code Playgroud) 我看到这个 jupyter notebook
!pip install -Uqq fastbook
Run Code Online (Sandbox Code Playgroud)
! 在 shell 上运行命令。U代表升级。选项qq是什么意思?q代表安静。
为什么有两个q?
抬起头来pip install --help。查找用户指南无济于事。