0

I am attempting to install a few modules to use with openpyxl. Among those modules is natsort. I have used pip install natsort in my command prompt to install it, which the command prompt says was completed successfully.

When testing to see that all of the modules I want to use were installed properly:

from openpyxl import Workbook
from openpyxl.drawing.image import Image
from openpyxl.utils import get_column_letter
import glob
import os
from natsort import natsorted

I get the error:

Traceback (most recent call last):
  File "c:\Users\wes\Desktop\PhotoLog\PhotoLog_script.py", line 6, in <module>
    from natsort import natsorted
ModuleNotFoundError: No module named 'natsort'

I have restarted my machine a few times now and attempted to reinstall natsort using pip, which it says the requirements are already satisfied.

Any suggestions on how I can go about fixing this?

sinoroc
  • 18,409
  • 2
  • 39
  • 70
  • https://snarky.ca/why-you-should-use-python-m-pip/ – sinoroc Apr 18 '23 at 17:51
  • 1
    A bunch of similar questions have already been asked. Does this one answer your question? [Unable to import a module that is definitely installed](/q/14295680/4518341). BTW, welcome to Stack Overflow! Check out the [tour], and [ask] for tips like starting with your own research. – wjandrea Apr 18 '23 at 17:51

0 Answers0