Embed python code in PHP Failed

Asked by Rajesh kannan on 2013-01-18

Hi everyone,

I want to embed python code in PHP. For that it ask me to install python package for PHP using pear installer by the command

# pecl install python

when i run this command its failed install every time, showing the error message..

configure: error: Please specify path to Python distribution files
ERROR: `/tmp/pear/temp/python/configure' failed

i dunno what to do, and how to specify the path. Anyone having the solution please help me...

Thnaks & Regards,
Rajesh kannan.R

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu php5 Edit question
Assignee:
No assignee Edit question
Solved by:
Rajesh kannan
Solved:
2013-01-25
Last query:
2013-01-25
Last reply:

Hi everyone..

I solved the problem..

Now i called the python code from PHP file by using the system function..

<?php
system("path/to/python filename.py");
?>

Thanks & Regards
Rajesh kannan.R