Unable to run the freeze command

Condition

You see the /usr/lib/hue/build/env/bin/python: No such file or directory error when you run the following command:
build/env/bin/pip3.8 freeze

Cause

This issue is caused because of an incorrect path in Hue's pip3.8 file.

Solution

Run the freeze command by specifying the paths of python3.8 and pip3.8 as follows:
/opt/cloudera/parcels/CDH/lib/hue/build/env/bin/python3.8 /opt/cloudera/parcels/CDH/lib/hue/build/env/bin/pip3.8 freeze