How can I solve this issu : /bin/sh: 1: exec: python: not found. Deploying Django app with Passenger

53 Views Asked by At

I have a VPS with Ubuntu 22.04.3 LTS and Plesk Obsidian Version 18.0.58

I'm a begginer in app deployement.

I want to deploy a Django app on this server so I followed this tutorial : https://support.plesk.com/hc/en-us/articles/12377516625559-How-to-install-Django-applications-in-Plesk-

But I received this error : "/bin/sh: 1: exec: python: not found" and an error page of Passenger.

How can I solve this ?

Thank you for your help !

I tried to find a configuration of Passenger but I didn't find it.

1

There are 1 best solutions below

0
DevEzro On

That error means your system can't find your python executable. First check your python version with python3 --version. If not installed yet type sudo apt-get update and then sudo apt-get install python3.Try to adjust the Passenger Configuration to specify the correct Python exec. path: /etc/systemd/system/plesk-php73-fpm.service.d/phusion-passenger.conf. The 73 number must be replaced with your PHP version. Finally restart teh services with sudo systemctl restart plesk-php73-fpm.service and sudo systemctl restart apache2

Hope this can help you :)