Apache/2.4.20 (Win64) Python2.7 VC9 mod_wsgi.so

707 views
Skip to first unread message

sor...@gmail.com

unread,
Dec 14, 2016, 9:08:14 AM12/14/16
to modwsgi
Hi,

I'm having problems compiling mod_wsgi.so for:
Apache/2.4.20 (Win64)
Python2.7
VC9

does someone has the compiled binary for these options?

Thanks,
Ofer


Graham Dumpleton

unread,
Dec 14, 2016, 3:40:27 PM12/14/16
to mod...@googlegroups.com
How are you trying to compile it? What steps are you following and with what build files etc? What is URL link to any instructions? What is the actual problem?

Compiling mod_wsgi for Python 2.7 is a bit of a problem for various reasons.

This is because Python 2.7 was compiled with VC9, yet Apache versions tend now to only be available for VC14 and technically it may not work when mixing VC9 object binaries with VC14 object binaries.

So as well as the above, what Microsoft C/C++ compiler are you using? Where did you get the Apache 2.4 binary? Are you using all 32 bit, or all 64 bit packages?

Graham

sor...@gmail.com

unread,
Dec 15, 2016, 3:54:04 AM12/15/16
to modwsgi
I'm following the steps from:

I've installed  VCForPython27 from:

I have python 2.7.9 32 bit.

I have Apache 2.4.23 32 bit.

I had all working, until I wanted to try the same Apache but 64 bit, and now I'm having problems compiling, or finding the relevant mod_wsgi bin online.

sor...@gmail.com

unread,
Dec 15, 2016, 4:02:01 AM12/15/16
to modwsgi
these are the errors:
c:\users\oferso\desktop\mod_wsgi-develop\src\server\wsgi_python.h(24) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directorywsgi_metrics.c
c:\users\oferso\desktop\mod_wsgi-develop\src\server\wsgi_python.h(24) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directorywsgi_restrict.c
c:\users\oferso\desktop\mod_wsgi-develop\src\server\wsgi_python.h(24) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directorywsgi_server.c
c:\users\oferso\desktop\mod_wsgi-develop\src\server\wsgi_python.h(24) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directorywsgi_stream.c
c:\users\oferso\desktop\mod_wsgi-develop\src\server\wsgi_python.h(24) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directorywsgi_thread.c
c:\users\oferso\desktop\mod_wsgi-develop\src\server\wsgi_python.h(24) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directorywsgi_validate.c
c:\users\oferso\desktop\mod_wsgi-develop\src\server\wsgi_python.h(24) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directoryGenerating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\x86_amd64\cl.EXE"' : return code '0x2'
Stop.

Graham Dumpleton

unread,
Dec 15, 2016, 4:02:04 AM12/15/16
to mod...@googlegroups.com
On 15 Dec 2016, at 7:54 PM, sor...@gmail.com wrote:

I'm following the steps from:

I've installed  VCForPython27 from:

I have python 2.7.9 32 bit.

I have Apache 2.4.23 32 bit.

I had all working, until I wanted to try the same Apache but 64 bit, and now I'm having problems compiling, or finding the relevant mod_wsgi bin online.

You can’t mix 32 bit Python with 64 bit Apache. From memory installing 64 bit VC9 compiler is also tricky.

Is there a reason you need Python 2.7? It would be so much easier if you use Python 3.5.

On Wednesday, December 14, 2016 at 4:08:14 PM UTC+2, sor...@gmail.com wrote:
Hi,

I'm having problems compiling mod_wsgi.so for:
Apache/2.4.20 (Win64)
Python2.7
VC9

does someone has the compiled binary for these options?

Thanks,
Ofer



--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

sor...@gmail.com

unread,
Dec 15, 2016, 4:07:46 AM12/15/16
to modwsgi
It would require a lot of work :-(

sor...@gmail.com

unread,
Dec 15, 2016, 4:18:07 AM12/15/16
to modwsgi
I can't move from Python 2.7

Graham Dumpleton

unread,
Dec 15, 2016, 4:25:25 AM12/15/16
to mod...@googlegroups.com
If you can get back to everything being all 32 bit, or all 64 bit, that is for Python, Apache and compiler, and you have ‘pip’ installed and ‘pip' works for a package which has a C extension which needs to be compiled, you can always try doing:

    pip install mod_wsgi

and see if it builds and installs.

This works for Python 3.5 and Apache 2.4, but not tested with other versions.

It expects Apache to be installed in ‘C:\Apache2.4’. If you have it elsewhere, set the environment variable like:

    MOD_WSGI_APACHE_ROOTDIR=C:\Apache2.4

before running ‘pip’.

If can get that far, then run:

    mod_wsgi-express module-config

and it will output what you need to put in the Apache configuration file to load mod_wsgi.

Graham

Reply all
Reply to author
Forward
0 new messages