How to Solve NameError: name 'jieba' is not defined

Solution: Import the 'jieba' module

# Add the following line to the top of your code
import jieba

 

For more information:
Python jieba