Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 514371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:31:04+00:00 2026-05-13T07:31:04+00:00

I’m trying to run mod_wsgi 3.1 under Apache 2.2.14 using a non-default python installation

  • 0

I’m trying to run mod_wsgi 3.1 under Apache 2.2.14 using a non-default python installation on Mac OS X 10.6.

After downloading the mod_wsgi source I run:

sudo apachectl -k stop

then

./configure --with-python=/usr/local/Cellar/python/2.6.4/bin/python
make
sudo make install

I then start up apache again

sudo apachectl -k start

When I cat /var/log/httpd/error_log I see:

[Mon Dec 21 12:27:26 2009] [warn] mod_wsgi: Compiled for Python/2.6.4.

[Mon Dec 21 12:27:26 2009] [warn] mod_wsgi: Runtime using Python/2.6.1.

[Mon Dec 21 12:27:26 2009] [notice] Apache/2.2.14 (Unix) DAV/2 mod_wsgi/3.1 Python/2.6.1 configured — resuming normal operations

When I run otool -L mod_wsgi.so is see:

mod_wsgi.so:

/System/Library/Frameworks/Python.framework/Versions/2.6/Python (compatibility version 2.6.0, current version 2.6.1)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)

What gives? Why is it linking with the system framework?

Here is the output from my mod_wsgi configure and build commands:


Archimedes:mod_wsgi-3.1 awolf$ ./configure –with-python=/usr/local/Cellar/python/2.6.4/bin/python

checking for apxs2… no

checking for apxs… /opt/apache2/bin/apxs

checking Apache version… 2.2.14

configure: creating ./config.status

config.status: creating Makefile

Archimedes:mod_wsgi-3.1 awolf$ make

/opt/apache2/bin/apxs -c -I/usr/local/Cellar/python/2.6.4/include/python2.6 -DNDEBUG -Wc,’-arch x86_64′ mod_wsgi.c -L/usr/local/Cellar/python/2.6.4/lib -L/usr/local/Cellar/python/2.6.4/lib/python2.6/config -arch x86_64 -lpython2.6 -ldl
/Library/Webserver/build/libtool –silent –mode=compile gcc -prefer-pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -I/opt/apache2/include -I/opt/apache2/include -I/opt/apache2/include -arch x86_64 -I/usr/local/Cellar/python/2.6.4/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo

In file included from /usr/local/Cellar/python/2.6.4/include/python2.6/Python.h:125,

             from mod_wsgi.c:135:

/usr/local/Cellar/python/2.6.4/include/python2.6/modsupport.h:27: warning: ‘PyArg_ParseTuple’ is an unrecognized format function type
/Library/Webserver/build/libtool –silent –mode=link gcc -o mod_wsgi.la -rpath /opt/apache2/modules -module -avoid-version mod_wsgi.lo -L/usr/local/Cellar/python/2.6.4/lib -L/usr/local/Cellar/python/2.6.4/lib/python2.6/config -arch x86_64 -lpython2.6 -ldl

Archimedes:mod_wsgi-3.1 awolf$ sudo make install

Password:

/opt/apache2/bin/apxs -i -S LIBEXECDIR=/opt/apache2/modules -n ‘mod_wsgi’ mod_wsgi.la

/Library/Webserver/build/instdso.sh SH_LIBTOOL=’/Library/Webserver/build/libtool’ mod_wsgi.la /opt/apache2/modules

/Library/Webserver/build/libtool –mode=install cp mod_wsgi.la /opt/apache2/modules/

cp .libs/mod_wsgi.so /opt/apache2/modules/mod_wsgi.so

cp .libs/mod_wsgi.lai /opt/apache2/modules/mod_wsgi.la

cp .libs/mod_wsgi.a /opt/apache2/modules/mod_wsgi.a

chmod 644 /opt/apache2/modules/mod_wsgi.a

ranlib /opt/apache2/modules/mod_wsgi.a

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:31:04+00:00Added an answer on May 13, 2026 at 7:31 am

    Graham helped me solve this over on the mod_wsgi mailing list.

    http://groups.google.com/group/modwsgi/browse_thread/thread/4046eaf290a49b1e/ae14888450de39f5#ae14888450de39f5

    Here’s a summary:

    The problem was my installation of python was done via Homebrew. Homebrew’s python is not installed as a framework OR dylib install so it could not be used for embedding (such as in Apache/mod_wsgi).

    Instead I installed python 2.6.4 from source:

    ./configure --prefix=/usr/local/python-2.6.4 --enable-framework=/usr/local/python-2.6.4/frameworks --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.5 --with-universal-archs=3-way
    make
    sudo make install
    

    I was able to build a version of python 2.6.4 that I could then build
    mod_wsgi with:

    ./configure --with-python=/usr/local/python-2.6.4/bin/python
    make
    sudo make install
    

    To confirm:

    otool -L /opt/apache2/modules/ mod_wsgi.so 
    

    /opt/apache2/modules/mod_wsgi.so:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 125.0.0)
    /usr/local/python-2.6.4/frameworks/Python.framework/Versions/2.6/Python (compatibility version 2.6.0, current version 2.6.0)

    shows that python is now using the 2.6.4 framework and not the system one. When I start apache, I no longer get the version mismatch warnings.

    I re-installed django, psycopg2, and so on into my new python installation and everything is working like a charm.
    Thanks again for your help!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 273k
  • Answers 273k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have a look at the similar question and at this… May 13, 2026 at 2:06 pm
  • Editorial Team
    Editorial Team added an answer -viewUnload is called after the application receives low-memory notification. It… May 13, 2026 at 2:06 pm
  • Editorial Team
    Editorial Team added an answer I haven't stumbled on this one before but after some… May 13, 2026 at 2:06 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.