pytest: 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/bin/pytest - from package: python-logilab-common

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

On Debian possible default full paths are:

/usr/bin/pytest - from package: python-logilab-common

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