Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Setting up Pyramid WSGI for Apache 2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Timmy  
View profile  
 More options Feb 1 2011, 12:38 am
From: Timmy <timmy.cha...@gmail.com>
Date: Mon, 31 Jan 2011 21:38:06 -0800 (PST)
Local: Tues, Feb 1 2011 12:38 am
Subject: Setting up Pyramid WSGI for Apache 2
I'm attempting to migrate from Pylons 1.0, and following the
directions on http://docs.pylonsproject.org/projects/pyramid/dev/tutorials/modwsgi/...

but I keep getting

ImportError: No module named pyramid.paster

is there anything i should be doing?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris McDonough  
View profile  
 More options Feb 1 2011, 11:04 am
From: Chris McDonough <chr...@plope.com>
Date: Tue, 01 Feb 2011 11:04:53 -0500
Local: Tues, Feb 1 2011 11:04 am
Subject: Re: Setting up Pyramid WSGI for Apache 2

On Mon, 2011-01-31 at 21:38 -0800, Timmy wrote:
> I'm attempting to migrate from Pylons 1.0, and following the
> directions on http://docs.pylonsproject.org/projects/pyramid/dev/tutorials/modwsgi/...

> but I keep getting

> ImportError: No module named pyramid.paster

> is there anything i should be doing?

Hard to know.  Sounds like your mod_wsgi's Python path doesn't include
Pyramid somehow.

- C


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Madynski  
View profile  
 More options Feb 1 2011, 1:15 pm
From: Jeff Madynski <jeff...@gmail.com>
Date: Tue, 1 Feb 2011 10:15:46 -0800
Local: Tues, Feb 1 2011 1:15 pm
Subject: Re: Setting up Pyramid WSGI for Apache 2
Timmy,
it sounds like you might have a config problem or possibly a
permissions problem.
Also note that during development, it is much easier to use paster
rather than apache since with apache you have to restart it every time
you change your code.  Using paster significantly reduces the friction
in the development process.

Another resource that might tip you off to your problem is here:
http://code.google.com/p/modwsgi/wiki/IntegrationWithPylons

I got it apache / mod_wsgi working, but with a couple of caveats:
a) i used modwsgideploy, a helper script, read about it here:
http://turbogears.org/2.1/docs/main/Deployment/ModWSGI.html#deploy-mo...
b) i use a mac - apache layout may be different for you in terms of
user apache runs as, and file layout
c) i use virtualenv

Below are the relevant portions of my config files. I have bad naming
conventions, I was just learning how to do it myself.

Hope this helps,
--jeff

here is snippet from
httpd.conf which pulls in xexample.conf, which is the file that
contains the mod_wsgi 3.2 directives, among other things.  most
important line is WSGIScriptAlias which is a python file for my web
app:

Include /private/etc/apache2/other/*.conf

That snippet will include this file xexample.conf which lives with
apache config files.
Here is /etc/apache2/other/xexample.conf
=========

Alias /xexample/images
/Users/jeff/src/.virtualenvs/xexample/xexample/public/images
Alias /xexample/css /Users/jeff/src/.virtualenvs/xexample/xexample/public/css
Alias /xexample/javascript
/Users/jeff/src/.virtualenvs/xexample/xexample/public/javascript
<Directory /Users/jeff/src/.virtualenvs/xexample/xexample/public>
Order deny,allow
Allow from all
</Directory>

WSGIDaemonProcess xexample threads=10 processes=3
WSGIProcessGroup xexample
WSGIScriptAlias /xexample
/Users/jeff/src/.virtualenvs/xexample/apache/xexample.wsgi

<Directory /Users/jeff/src/.virtualenvs/xexample/apache>
Order deny,allow
Allow from all
</Directory>

============

i have a virtual env
Remember that the apache user has to own the folder
Here is /Users/jeff/src/.virtualenvs/xexample/apache/xexample.wsgi
Notice how the python libraries in my virtualenv are pulled in.
======

import sys
prev_sys_path = list(sys.path)

import site
site.addsitedir('/Users/jeff/src/.virtualenvs/tg2_jeff/lib/python2.6/site-p ackages')

import os, sys
sys.path.append('/Users/jeff/src/.virtualenvs/xexample')

os.environ['PYTHON_EGG_CACHE'] =
'/User/jeff/src/.virtualenvs/xexample/python-eggs'

application = loadapp('config:/Users/jeff/src/.virtualenvs/xexample/development.ini')

===
after apache restart, pointing browser to http://localhost/xexample
loaded the home page of my app.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »