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

  • SEARCH
  • Home
  • 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 6879593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:51:57+00:00 2026-05-27T04:51:57+00:00

I have deployed a Pyramid app using mod_wsgi. I have setup the python path

  • 0

I have deployed a Pyramid app using mod_wsgi.

I have setup the python path in the virtualhost:

WSGIDaemonProcess MyApp user=myUser group=staff threads=4 python-path=/home/myapp/env/lib/python2.7/site-packages
WSGIScriptAlias / /home/myapp/env/pyramid.wsgi

for debugging purposes, in pyramid.wsgi, I have also put:

import sys

print(sys.path)
print(sys.version)

When I visit the app I can see the app is using python 2.6 instead of 2.7!

The sys.path outputs this:

 ['/home/myapp/env/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', 
'/home/myapp/env/lib/python2.7/site-packages/pip-1.0.1-py2.7.egg', 
'/home/myapp/env/lib/python2.7/site-packages', 
'/home/myapp/env/lib/python2.7/site-packages/PIL', 
'/opt/local/lib/python2.6/site-packages/setuptools-0.6c12dev_r88846-py2.6.egg', 
'/opt/local/lib/python2.6/site-packages/virtualenv-1.6.1-py2.6.egg', 
'/opt/local/lib/python26.zip', 
'/opt/local/lib/python2.6', 
'/opt/local/lib/python2.6/plat-sunos5', 
'/opt/local/lib/python2.6/lib-tk', 
'/opt/local/lib/python2.6/lib-old', 
'/opt/local/lib/python2.6/lib-dynload', 
'/opt/local/lib/python2.6/site-packages']

You can see the python 2.6 paths are there, but if I ssh to the server and execute python it launches python2.7.

where does 2.6 come from? which user(apache?) is calling this wsgi app so I can change its python environment?

pls help!

  • 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-27T04:51:58+00:00Added an answer on May 27, 2026 at 4:51 am

    Instead of using apache with mod_wsgi you should look at using a more relevant webserver for python such as gunicorn. Gunicorn is written in python and is very fast but most importantly you will be able to easily tell it which python version to run under without compiling/linking different versions.

    Its as easy as:

    pip install gunicorn 
    gunicorn --workers=2 /home/myapp/env/pyramid.wsgi:app
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have deployed an app to an IIS6 server. For now, I'm using the
I have deployed a rails app on unicorn, and am using Capistrano to manage
In the project I am working I have deployed a SOAP server using Deployment
I've made a website to go on App Engine, and have deployed it. I've
I have deployed my windows service (using independently installer class and SC.EXE), but I
I have deployed an application on Google App Engine; I would like to see
Let's say I have deployed my Rails app on a VPS, and everything works
I have deployed my pylons app on the server~ I use nginx end flup,
I have deployed an enterprise app in an EAR and a standalone web app
I have deployed my PHP web app on Amazon Ec2 cloud , but my

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.