pip install ntlk for python2 code example Example 1: nltk pip pip install nltk Example 2: import nltk in python import nltk