Search code examples
pythoninstallationpippackagekaggle

Why ! is used before pip command?


I worked on a dataset in Kaggle and I see that in some python notebooks, they have used ! before pip command for installing packages.

For example: !pip install rank_bm25 nltk

Is there any reason behind it?


Solution

  • In some python interactive shells like ipython or kaggle ! is prefixed to run external shell command.