Python3 Scripts Return Error 500 In All Cases

Hi all,

I am attempting to use python scripts as a service and as a pre-post process script but in either case but I am getting the below response along with my initial request.

“error”: {
“code”: 500,
“context”: null,
“message”: “Executed command returned with error code: 1”,
“status_code”: 500

This error occurs with any type of python code (including the sample code). Nodejs and PHP are working correctly.

print(‘Hello Python’)

return(‘Hello Python’)

raise ValueError(‘Hello Python’);

I have set the confirmed both Python3 (3.5) and Python are set paths.

I have added the below to my .env file and /etc/environment


I have confirmed that this is the actual location of the python executables.

I’ve installed munch using pip3 (confirmed installation in python3.5/site-packages)

I’ve restarted apache2 and

php artisan cache:clear
php/php artisan config:clear

Python installations: