Natural Sorting in Python with natsort To get started, you can install the natsort library using pip: $ pip3 install natsort Requires Python 3.7+. So any recent version should suffice.