query.py: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/lib/python2.6/site-packages/viewvc/bin/mod_python/query.py - from package: viewvc

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/share/gforge/www/scm/viewvc/bin/mod_python/query.py - from package: gforge-web-apache2

You may install the required package with command apt-get install {package}
Error in other languages:
query.py: bevel nie gevind nie
query.py: comandă negăsită
query.py: comando não encontrado
query.py: commande introuvable
query.py: command not found
query.py: käsku ei ole
query.py: không tìm thấy lệnh
query.py: komanda nerasta
query.py: Kommando nicht gefunden.
query.py: kommandot finns inte
query.py: komut yok
query.py: nie znaleziono polecenia
query.py: níor aimsíodh an t-ordú
query.py: no se encontró la orden
query.py: no s'ha trobat l'ordre
query.py: opdracht niet gevonden
query.py: parancs nem található
query.py: perintah tidak ditemukan
query.py: príkaz nenájdený
query.py: příkaz nenalezen
query.py: команда не найдена
query.py: командата не е открита
query.py: 命令找不到
query.py: コマンドが見つかりません