How to Install and Uninstall python3-natsort Package on Ubuntu 16.04 LTS (Xenial Xerus)

Last updated: May 07,2024

1. Install "python3-natsort" package

This guide let you learn how to install python3-natsort on Ubuntu 16.04 LTS (Xenial Xerus)

$ sudo apt update $ sudo apt install python3-natsort

2. Uninstall "python3-natsort" package

This guide let you learn how to uninstall python3-natsort on Ubuntu 16.04 LTS (Xenial Xerus):

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

3. Information about the python3-natsort package on Ubuntu 16.04 LTS (Xenial Xerus)

Package: python3-natsort
Priority: optional
Section: universe/python
Installed-Size: 120
Maintainer: Ubuntu Developers
Original-Maintainer: Agustin Henze
Architecture: all
Source: natsort
Version: 4.0.3-2
Depends: python3, python3:any (>= 3.4~)
Recommends: python-natsort-doc
Breaks: python-natsort (<= 3.2.1-1)
Filename: pool/universe/n/natsort/python3-natsort_4.0.3-2_all.deb
Size: 24572
MD5sum: 0dc196f3b5a5d095071cc585bbd075be
SHA1: 6ab80772fcf9efc804dae1237ce1f3616cffed73
SHA256: 2d65366c7ca7c9763ba369233b98b833cefe215aabc026e92585b5f5147eb6c6
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.
Description-md5: 3f1f0e8348b5dbb630544b429c54aeff
Homepage: https://github.com/SethMMorton/natsort
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu