weasyprint command not found

In this troubleshooting guide we learn how to fix weasyprint command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

weasyprint: command not found

or when using sudo you get the following error message

sudo: weasyprint: command not found

Solutions to weasyprint: command not found

How To Fix weasyprint: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu weasyprint is provided by weasyprint package.

weasyprint is:

WeasyPrint is a smart solution helping web developers to create PDF documents. It turns simple HTML pages into gorgeous statistical reports, invoices, tickets, etc.

From a technical point of view, WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF and PNG. It aims to support web standards for printing. WeasyPrint is free software made available under a BSD license.

It is based on various libraries but not on a full rendering engine like WebKit or Gecko. The CSS layout engine is written in Python, designed for pagination, and meant to be easy to hack on.

To fix this problem, we can install more using the command below.

sudo apt-get -y install weasyprint

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install weasyprint.

sudo apt -y install weasyprint

Or if you have aptitude installed you can use the following command.

sudo aptitude install weasyprint

Summary

In this tutorial we learn how to fix weasyprint command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.