On 64-bit Windows 10, I'm using a Python virtualenv for a project, for which I'd like to serve CGI scripts.
I'm using ApacheHaus's windows binary install for Apache 2.4, 32-bit. Python is Python 2.7, 32-bit.
Maybe I want/need to use some of the settings of mod_python... but I can't find a suitable binary installer for that. Or maybe I don't need mod_python. Here are more details of my problem:
- My scripts need to be deployed/deployable on both Win 10 and Ubuntu. No problem, I have all my scripts working just fine on both platforms.
- Things get dicey with the "#!" notation: what works on Ubuntu won't work on Windows.
- OK, maybe "ScriptInterpreterSource Registry" can save me...
- ...but the instance of Python I need to run is NOT in the Registry; it is the one that activates when I run the vitualenv command "workon".
"Almost fixes" that won't work for me:
1) I know there are script-based hacks to get virtualenvs to work... but those won't be portable to our Ubuntu installs. (And of course I HATE having to graft custom "fix me" code at the top of every CGI file.)
2) I can't just "correct" the Windows registry then use "ScriptInterpreterSource Registry" to point to the venv python instance... because that is not right for the REST of my Windows box.
3) I'm not ready/interested to cut over my Python CGI files to WSGI yet.
It seems like I need something like "ScriptInterpreterSource Fixed C:/path/to/my/venv/bin/python.exe"... but that is not a valid arg to "ScriptInterpreterSource".
Or it seems I need to use something like mod_python's "PythonInterpreter" directive... but I can't find a Windows binary build of mod_python for Py 2.7, Apache 2.4. Is mod_python still alive? And: would this fix my problem anyways?
I'm having the darnedest time getting this to work.
Help! Many, many thanks in advance.