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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap