Bundling Python in XAMPP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Bundling Python in XAMPP

Postby lavanyadeepak » 03. July 2021 08:37

Is it possible to bundle Python along with XAMPP? Because we have a lot of Python projects and it would be immensely helpful if the familiar XAMPP setup supports the same.
lavanyadeepak
 
Posts: 13
Joined: 04. November 2019 15:26
XAMPP version: 7.1.33
Operating System: Windows 10

Re: Bundling Python in XAMPP

Postby Nobbie » 03. July 2021 10:24

I dont think there are any plans for Python in Xampp. Anyway, using the standard CGI option in Xampp it should not be a difficult task to add Python in CGI mode to an existing Xampp installation.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Bundling Python in XAMPP

Postby lwc » 11. November 2022 21:10

Why include PHP and not Python?

All you need to do is:
  1. Take the official Python archive and include it as a sub folder called python.
  2. Add AddHandler cgi-script .py into apache's httpd.conf (the link below seemingly falsely claims it's mandatory to also add ScriptInterpreterSource Registry-Strict)
  3. Optionally add index.py, default.py and home.py to to the <IfModule dir_module> section in httpd.conf so these files could launch by default when browsing to folder
Then all one needs to is at this to the beginning of each PY file:
#!Python\python.exe (in Mac I guess it's #!python)

See https://blog.terresquall.com/2021/10/running-python-in-xampp/
lwc
 
Posts: 8
Joined: 31. October 2022 08:20
XAMPP version: 8.1.0
Operating System: Windows 10

Re: Bundling Python in XAMPP

Postby lwc » 22. November 2022 20:14

lwc wrote:Why include PHP and not Python?

All you need to do is:

Did anyone get a chance to review this?
lwc
 
Posts: 8
Joined: 31. October 2022 08:20
XAMPP version: 8.1.0
Operating System: Windows 10

Re: Bundling Python in XAMPP

Postby sachalizz » 18. October 2023 04:05

lavanyadeepak wrote:Is it possible to bundle Python along with XAMPP? Because we have a lot of Python projects and it would be immensely helpful if the familiar XAMPP setup supports the same.

The error has not yet been completely resolved. There is no perfect solution yet.
sachalizz
 
Posts: 1
Joined: 18. October 2023 03:56
XAMPP version: 8.2.4
Operating System: PHP


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 95 guests