2014-09-03 3 views
0

를 통해 파이썬 lampp를 (리눅스)를 실행 :내가 파일이 아파치

#!/usr/lib/python2.7 
print("Content-Type: text/html\n") 
print("test") 

나는 다음과 같은 오류 메시지가 나타납니다 :이 파일에 test.py 권한이 777로 설정을, 나는 다음과 같은 스크립트를 실행하려고하고 :

The server encountered an internal error and was unable to complete your request. 

Error message: 
End of script output before headers: test.py 

If you think this is a server error, please contact the webmaster. 

Error 500 

파이썬이 설치됩니다

$ python --version 
>> Python 2.7.4 

답변

0

문제를 해결, 당신은 위치 O를 사용할 필요가 f 파이썬 인터프리터 (파이썬 인터프리터는 파이썬 인터프리터에서 다음 스크립트를 실행하여 찾을 수 있음) :

import sys; sys.executable;