lesscpy command not found

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

Introduction

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

lesscpy: command not found

or when using sudo you get the following error message

sudo: lesscpy: command not found

Solutions to lesscpy: command not found

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

In Ubuntu lesscpy is provided by python3-lesscpy package.

python3-lesscpy is:

Lesscpy is a compiler written in Python for the lesscss language. It is very useful if node.js can’t be installed in the environment. Not all features of lesscss are supported (yet). Some features wil probably never be supported (JavaScript evaluation).

This program uses PLY (Python Lex-Yacc) to tokenize/parse the input and is considerably slower than the nodejs compiler.

This package provides the Python 3.x module.

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

sudo apt-get -y install python3-lesscpy

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

You can also use apt command to install python3-lesscpy.

sudo apt -y install python3-lesscpy

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

sudo aptitude install python3-lesscpy

Summary

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