yapf3 command not found

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

Introduction

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

yapf3: command not found

or when using sudo you get the following error message

sudo: yapf3: command not found

Solutions to yapf3: command not found

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

In Ubuntu yapf3 is provided by yapf3 package.

yapf3 is:

Yapf is a tool that reformats code to the best formatting that conforms to the style guide. It is not only concerned with lint errors, but also with the stylistic appearance of Python code. The idea is also similar to the ‘gofmt’ tool for the Go programming language. This package installs the tool for Python

This package provides the command-line interface for Python 3.

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

sudo apt-get -y install yapf3

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

You can also use apt command to install yapf3.

sudo apt -y install yapf3

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

sudo aptitude install yapf3

Summary

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