what is the difference between '!pip' and '%pip'? We can use both of them in jupyter notebook and google colab. But we can not use the simple 'pip' there, can we?
Asked
Active
Viewed 174 times
1 Answers
1
%pip
is a magic function and works mostly the same like pip
. You can use other magic functions in jupyter which you can list with %lsmagic
(https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-lsmagic)
Using !
allows to run commands like ls
or pip
or what you have available on your OS.
Colab is just like jupyter so you can run native pip
like pip install tensorflow
.
See related answers:
![](../../users/profiles/1681090.webp)
x4k3p
- 1,261
- 2
- 21
- 39