How to Install and Uninstall python3-natsort Package on Ubuntu 21.10 (Impish Indri)

Last updated: May 10,2024

1. Install "python3-natsort" package

In this section, we are going to explain the necessary steps to install python3-natsort on Ubuntu 21.10 (Impish Indri)

$ sudo apt update $ sudo apt install python3-natsort

2. Uninstall "python3-natsort" package

This tutorial shows how to uninstall python3-natsort on Ubuntu 21.10 (Impish Indri):

$ sudo apt remove python3-natsort $ sudo apt autoclean && sudo apt autoremove

3. Information about the python3-natsort package on Ubuntu 21.10 (Impish Indri)

Package: python3-natsort
Architecture: all
Version: 7.1.0-1
Priority: optional
Section: python
Source: natsort
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian Python Team
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 157
Depends: python3:any
Suggests: python-natsort-doc
Breaks: python-natsort (<= 3.2.1-1)
Filename: pool/main/n/natsort/python3-natsort_7.1.0-1_all.deb
Size: 30932
MD5sum: 7c66928d60f635e48b89a17188d15a1a
SHA1: 4083405509c279b8823f045d8ab42f5790b039ec
SHA256: f8d0351029a1624fd1fa654dd996b3a38684e78b7cf8301bd90647d27735fef7
SHA512: f772e9030ca64eec53ba0ad70b65a0fb734f573ff39f2e5d9798eedaedb5124b88ad809b3669799d26d2c97476c354312e104e2e7ce714a914f57ef37dc3d5b8
Homepage: https://github.com/SethMMorton/natsort
Description-en: Natural sorting for Python (Python3)
natsort lets you apply natural sorting to your sequences easily, for example:
.
>>> from natsort import natsorted
>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
>>> data = [['a1', 'a5'], ['a1', 'a40'], ['a10', 'a1'], ['a2', 'a5']]
>>> natsorted(a)
['a1', 'a2', 'a4', 'a9', 'a10'
>>> natsorted(data)
[['a1', 'a5'], ['a1', 'a40'], ['a2', 'a5'], ['a10', 'a1']]
.
natsort identifies the numbers and sorts them separately from strings.
.
natsort comes with a shell script to use natural sorting in shell scripts. You
can also execute natsort from the command line with Python -m natsort.
.
There exists another natural sorting package for Python called
python-naturalsort. You may prefer that package if you wish to only sort
version numbers.
.
This is the Python 3 version of the package.
Description-md5: 98d2b44c329103b0763d58c8d8e1dcd6