python2-config: 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 Debian possible default full paths are:

/usr/bin/python2-config - from package: python-dev

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