uvicorn command not found

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

Introduction

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

uvicorn: command not found

or when using sudo you get the following error message

sudo: uvicorn: command not found

Solutions to uvicorn: command not found

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

In Ubuntu uvicorn is provided by uvicorn package.

uvicorn is:

Uvicorn is a fast ASGI server, built on uvloop and httptools. It currently supports HTTP/1.1 and WebSockets.

Uvicorn is designed with particular attention to connection and resource management, in order to provide a robust server implementation. It aims to ensure graceful behavior to either server or client errors, and resilience to poor client behavior or denial of service attacks.

This package contains the CLI script.

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

sudo apt-get -y install uvicorn

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

You can also use apt command to install uvicorn.

sudo apt -y install uvicorn

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

sudo aptitude install uvicorn

Summary

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