Python: Fix ModuleNotFoundError - No module named pandas

ModuleNotFoundError- No module named pandas

If while executing a Python program you get an error "ModuleNotFoundError" and it says "No module named 'pandas', then the reason for this error is, in your program, you have made use of the pandas module, but the module is not available locally on your device or your project.

In such case you need to make use of the pip3 package installer for Python and get pandas installed.


Fix: ModuleNotFoundError pandas

  1. Open Terminal/Command Prompt.
  2. Run the below command.
    pip3 install pandas

    or,

    pip install pandas
  3. Again run your code and it should not have this error again.
installing Pandas Module using Pip3

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!