How do I configure mod_wsgi with python that has been built from source code?

I want to build mod_wsgi against a Python which I have built myself from source code in Ubuntu. (You can see specifically how I built it in How would I build python myself from source code on Ubuntu?)

I tried running this from within the mod_wsgi-3.3 directory:

$ sudo ./configure --with-apxs=/usr/local/apache2/bin/apxs \ --with-python=/usr/local/share/man/man1/python2.7.1

which was probably pretty naive since I know that python2.7.1 is just a text file and not an executable, which the command probably expects. I ended up getting a bunch of Permission denied messages even though I ran it in sudo.

So how would I build mod_wsgi against a Python that has been built from source code?

Also, are there any inherent issues I should expect in the future in having the Python I built and the default Ubuntu Python co-existing in separate directories?

-------------Problems Reply------------

Instead of

./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/share/man/man1/python2.7.1

I would assume you would want to use:

./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/bin/python2.7.1

I think you want to tell mod_wsgi to use the path to the python executable rather than the man page

The documentation is pretty clear about what was required.

Category:python Views:1 Time:2011-11-13

Related post

  • Python: Install a module out of source code 2011-01-12

    certainly you all know the answer and it's easy going, but I'm new to python :) I found a piece of code in the internet reading the stock price from yahoo finance #!/usr/bin/env python # # Copyright (c) 2007-2008, Corey Goldberg ([email protected]) # #

  • Python WebKitWebView: how to get (generated) source code 2011-06-06

    Is it possible to get the generated source code (so including JavaScript added DOM nodes) with Python and WebKit, and if so, how? import webkit web_view = webkit.WebView()'') But then? --------------Solutions----------

  • Python CGI without HTML clutter in source code? 2011-04-01

    I am new to web development. After much consideration I picked Python over Ruby simply because code readability is important to me. I have looked at a few Python cgi code and I wondered if it is possible to polish that code in such a manner that I ca

  • How to configure storage card for the Windows Mobile emulator by source code? 2011-12-22

    How can I programmatically configure a storage card for the Windows Mobile emulator? I'm automating my tests. I can make a cradle and connect. Now I just need to configure the storage card. --------------Solutions------------- You may use SetConfigur

  • Python: Problems finding string in website source code 2010-05-06

    I open a website with urlopen. I then put the website sourcecode into a variable like so source = When I just print the source it comes out formatted correctly, however when I try to iterate through each line each character is it's own

  • python: enter captcha then get url source code 2011-06-20

    I need to enter (via prompt is fine) a captcha and retrieve the resulting pages' source code I'm using urllib but, the entering of the captcha cannot be done via urllib (as one would need to see the captcha image) My thoughts: I was wondering if the

  • Installing python 2.7 from source code in cygwin 2012-03-24

    I m trying to install python 2.7 in cygwin from source code as I have to execute a script that runs fine on 2.7. "./configure" get paused as below ./configure checking for --enable-universalsdk... no checking for --with-universal-archs... 32-bit chec

  • How to configure IntelliJ IDEA and/or Maven to automatically add directories with Java source code generated using jaxb2-maven-plugin? 2010-04-15

    In our project we are using jaxb2-maven-plugin to generate Java source code from XML Schema, which causes that our Maven module requires additional source code directory (in our case target/generated/main/java). Up to date I've been using Eclipse and

  • Building mod_wsgi using python 2.5 on Snow Leopard 2010-08-20

    I'm using the Python 2.5 that came with Mac OS X Snow Leopard (10.6). I've set the defaults value: defaults write Version 2.5 and normally I get python 2.5 as it suggests. However when I try to build mod_wsgi, that doesn't

  • Configure mod_wsgi on Mac OS X? 2011-05-13

    I have been trying to configure mod_wsgi for two days and still no luck. Here is what I did: Create a sample django project mysite. Run python runserver and make sure it's working Create apache directory under mysite, create apache_django_w

  • Apache mod_wsgi and python 2.7 2011-06-28

    My WSGI installation uses python2.6 and my django project requires python 2.7 to work properly. Is is possible to relink the python version WSGI uses without recompiling wsgi? I've been having some odd errors trying to compile wsgi and I'd prefer to

  • Edit configuration file through python 2011-03-14

    I need to edit a configuration file through python and i tried searching on stackoverflow and google and they don't cover my situation, since i need to replace lines in the file and perform matches in my search. Also, what i found covers how to do it

  • apache + mod_wsgi + aspell-python on OS X 10.5.8 2009-12-17

    I have a website that processes user submitted documents in a variety of ways, one of which is to do a spell check on a part of each document. When I set this website up on a Mac Mini (yes, I realize that's a pretty weak piece of equipment for a webs

  • What's the best way to generate a UML diagram from Python source code? 2008-11-03

    A colleague is looking to generate UML class diagrams from heaps of Python source code. He's primarily interested in the inheritance relationships, and mildly interested in compositional relationships, and doesn't care much about class attributes tha

  • Uninstall python built from source? 2010-08-23

    I've installed python 2.6 from source, and somehow later mistakenly installed another python 2.6 from a package manager too. I can't find a way to uninstall a python that was built from source, is this possible/easy? Running ubuntu 10.04 Thanks. ----

  • Cannot install python packages from source-code 2011-05-02

    I need to install PIL (python imaging library) on my Ubunto10.4-32bit (EDIT:64bit) machine on my python2.5.4-32bit. This question is also relevant to any other source package I guess (among those that I need are RPyC,psyco and numpy). I downloaded th

  • How would I build python myself from source code on Ubuntu? 2011-11-11

    Ubuntu comes with Python 2.7.2+ pre-installed. (I also downloaded the python dev packages.) Because of another issue I'm having (Explained in extreme depth in How do I replace/update the version of the expat library used by Apache? ), Graham Dumpleto

  • How well does Python's whitespace dependency interact with source control with regards to merging? 2008-09-23

    I'm wondering if the need to alter the indentation of code to adjust the nesting has any adverse effects on merging changes in a system like SVN. This is a really open ended question. I'm sort of fishing for information/anecdotes here. Edit: Thanks a

  • How do you break into the debugger from Python source code? 2008-09-29

    What do you insert into Python source code to have it break into pdb (when execution gets to that spot)? --------------Solutions------------- import pdb; pdb.set_trace() See Python: Coding in the Debugger for Beginners for this and more helpful hints

Copyright (C), All Rights Reserved.

processed in 0.171 (s). 11 q(s)