Search code examples
pythonexcelopenpyxlimporterror

Importing Openpyxl in one file works but in another file ModuleNotFoundError Comes


I have imported openpyxl in my test .py file. It work great in that file but when I import it in the software it shows this error:

C:\Python39\python.exe "C:/Users/User/Desktop/Wash & Fold Laundry Billing System/main.py" Traceback (most recent call last): File "C:\Users\User\Desktop\Wash & Fold Laundry Billing System\main.py", line 5, in from openpyxl import Workbook ModuleNotFoundError: No module named 'openpyxl' Process finished with exit code 1

I have tried each and every question in stackoverflow, google, w3schools, and geeksforgeeks but all the answers were in vain.


Solution

  • Ok So I Tried Everything and this one solution is the best.

    You Just Have To Delete all the configurations(pycharm) or Interpreters.