2

I've seen an example of installing via pip that uses syntax I've never seen before: !pip:

!pip install -q tf-nightly

I've Googled around but the ! makes it difficult to narrow down on, what's the ! for compared with the pip install?

Allyl Isocyanate
  • 13,306
  • 17
  • 79
  • 130

1 Answers1

4

It is used in jupyter notebooks inside code cells.

It tells jupyter environment to execute BASH command instead of Python (or other kernel you have chosen).

So, this command is simply equivalent to CLI's:

$ pip install

You can use other UNIX commands from within jupyter notebook like !ls or !pwd.

Szymon Maszke
  • 22,747
  • 4
  • 43
  • 83