With that php code you load a external URL, it does not matter in which programming language a external script is coded that you load with curl as you will get html back. So you dont execute a local python script here and you dont need python support on your server.
My guess is that you just dont have the php curl module installed. Install it with:
apt-get install php5-curl
and restart apache.