How To Install python3-pyzfs on Ubuntu 20.04

In this tutorial we learn how to install python3-pyzfs on Ubuntu 20.04. python3-pyzfs is wrapper for libzfs_core C library wrapper for libzfs_core C library wrapper for libzfs_core C library

Introduction

In this tutorial we learn how to install python3-pyzfs on Ubuntu 20.04.

What is python3-pyzfs

python3-pyzfs is:

libzfs_core is intended to be a stable interface for programmatic administration of ZFS. This wrapper provides one-to-one wrappers for libzfs_core API functions, but the signatures and types are more natural to Python.

nvlists are wrapped as dictionaries or lists depending on their usage. Some parameters have default values depending on typical use for increased convenience. Enumerations and bit flags become strings and lists of strings in Python. Errors are reported as exceptions rather than integer errno-style error codes. The wrapper takes care to provide one-to-many mapping of the error codes to the exceptions by interpreting a context in which the error code is produced.

Package: python3-pyzfs Architecture: amd64 Version: 0.8.3-1ubuntu12.9 Priority: optional Section: python Source: zfs-linux Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian ZFS on Linux maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 417 Depends: python3-cffi, zfsutils-linux (= 0.8.3-1ubuntu12.9), python3-cffi-backend-api-min (<= 9729), python3-cffi-backend-api-max (>= 9729), python3:any Filename: pool/main/z/zfs-linux/python3-pyzfs_0.8.3-1ubuntu12.9_amd64.deb Size: 55264 MD5sum: 0774697120e98ec00b62c4168ae9313e SHA1: 30c84b0f2a1cf860fed64ff95a18c925f7f03731 SHA256: 2b9fbb72c2f5d79c809ae43b7aa3ccbd3ddc27f177acd0fff7a1642769e37bb0 SHA512: 265b350e2b0559d877a5dd625cae847eb740d789a5d798900a5f9935a1dfbb2e3b885072ce439d9ac8c9aa9d99c3437f829f1cc0289a11264450f8131b6d9cb2 Homepage: https://zfsonlinux.org/ Description-en: wrapper for libzfs_core C library libzfs_core is intended to be a stable interface for programmatic administration of ZFS. This wrapper provides one-to-one wrappers for libzfs_core API functions, but the signatures and types are more natural to Python.

nvlists are wrapped as dictionaries or lists depending on their usage. Some parameters have default values depending on typical use for increased convenience. Enumerations and bit flags become strings and lists of strings in Python. Errors are reported as exceptions rather than integer errno-style error codes. The wrapper takes care to provide one-to-many mapping of the error codes to the exceptions by interpreting a context in which the error code is produced.

Package: python3-pyzfs Architecture: amd64 Version: 0.8.3-1ubuntu12 Priority: optional Section: python Source: zfs-linux Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian ZFS on Linux maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 416 Depends: python3-cffi, zfsutils-linux (= 0.8.3-1ubuntu12), python3-cffi-backend-api-min (<= 9729), python3-cffi-backend-api-max (>= 9729), python3:any Filename: pool/main/z/zfs-linux/python3-pyzfs_0.8.3-1ubuntu12_amd64.deb Size: 55280 MD5sum: 6d4149a8c689090764616c57d5043eff SHA1: ceb7a3c83f572db108dbaa2cf3196b7777c1878f SHA256: 81f8c113231a4fe5e357d32b50d5e89a955dea71ac82e3c521c75c93750d7790 Homepage: https://zfsonlinux.org/ Description-en: wrapper for libzfs_core C library libzfs_core is intended to be a stable interface for programmatic administration of ZFS. This wrapper provides one-to-one wrappers for libzfs_core API functions, but the signatures and types are more natural to Python.

nvlists are wrapped as dictionaries or lists depending on their usage. Some parameters have default values depending on typical use for increased convenience. Enumerations and bit flags become strings and lists of strings in Python. Errors are reported as exceptions rather than integer errno-style error codes. The wrapper takes care to provide one-to-many mapping of the error codes to the exceptions by interpreting a context in which the error code is produced.

There are three methods to install python3-pyzfs on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python3-pyzfs Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python3-pyzfs using apt-get by running the following command:

sudo apt-get -y install python3-pyzfs

Install python3-pyzfs Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python3-pyzfs using apt by running the following command:

sudo apt -y install python3-pyzfs

Install python3-pyzfs Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python3-pyzfs using aptitude by running the following command:

sudo aptitude -y install python3-pyzfs

How To Uninstall python3-pyzfs on Ubuntu 20.04

To uninstall only the python3-pyzfs package we can use the following command:

sudo apt-get remove python3-pyzfs

Uninstall python3-pyzfs And Its Dependencies

To uninstall python3-pyzfs and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove python3-pyzfs

Remove python3-pyzfs Configurations and Data

To remove python3-pyzfs configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge python3-pyzfs

Remove python3-pyzfs configuration, data, and all of its dependencies

We can use the following command to remove python3-pyzfs configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python3-pyzfs

References

Summary

In this tutorial we learn how to install python3-pyzfs package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.