Getting error for python libraries while installing GRR Incident response in Ubuntu 20.04 LTS

I am trying to install GRR Incident Response on Ubuntu 20.04 LTS. While installing the deb package "grr-server_3.4.2-3_amd64.deb". I get below errors:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'

Can anybody please provide solution to this problem?


I faced the same problem. I'm working in a conda environment and after trying endlessly updating both PYTHONHOME and PYTHONPATH without success, I looked for other solutions.

What did the trick for me was creating a soft link pointing to the python dir inside my conda environmet:

sudo ln -s $CONDA_PREFIX/lib/python3.6 /usr/lib/python3.6

Also don't forget to unset the PYTHONHOME and PYTHONPATH variables.