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 6707449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:38:26+00:00 2026-05-26T07:38:26+00:00

I am in the process of creating an django-powered (1.3) interface to a package

  • 0

I am in the process of creating an django-powered (1.3) interface to a package that relies heavily in scipy.stats.stats (scipy version 0.9.0), called ovl . During early development phases, using djangos own development-server, this was no problem. After deployment using apache debian/2.2.9 and mod_wsgi 3.3, this causes a serious problem.

Whatever view I’m trying to load in the browser, it starts loading, and keeps doing that for a good 5 minutes (until time-out) and a 500 page appears.
Just importing scipy works but, does not make scipy.stats.stats or even scipy.stats available. This is no surprise; in the documentation in scipy’s init.py it is stated that the subpackage stats needs to be imported explicitly. However, the same is said about the subpackage cluster, which imports in django (from the web and in the django-shell) without any problem and indeed shows up in dir(scipy), which it doesn’t in an ipython(0.10.2)-session, where it just doesn’t show up, like I kinda expected.

On the command dir(scipy); it returns different results when coming from the web (a list of 568 strings, including the subpackage cluster) in the normal ipython shell (564 strings, no subpackage cluster) and surprise, surprise, in the django shell. In the django shell scipy has 570 attributes, including both cluster and stats packages.

Another thing is, if I keep importing the ovl-package, while keeping the scipy.stats imports at a bit of a distance (not in one of the files of the app itself), sometimes I get a ViewDoesNotExist error stating that there is no method index in the views module while there clearly is one. Which reminds me of this.

So now I’m thinking of these rather ugly solutions:

  • Editing scipy’s init to import the stats package so it appears ‘normally’ in dir(scipy) and is accessible through scipy.stats and I can use the old code.
  • Snatching scipy’s stat subpackage and making a regular package out of it (perhaps using a symlink)

I’m reluctant in applying these solutions, however. The fact cluster shows up in scipy in a django environment worries me a bit. I thought maybe this has something to do with being www-data user when logging in from the web, but I don’t know how to check for that.

Did anyone else encounter this? Parts of this?
Or otherwise helpful thoughts?

Oh and another django deployment does work.

  • 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-26T07:38:27+00:00Added an answer on May 26, 2026 at 7:38 am

    mod_python used to try using multiple Python interpreters in the same process. mod_wsgi might be doing the same. While this frequently works okay, some extension modules do not support this. scipy.stats is probably importing such an extension module. We have had similar reports on the scipy mailing list concerning scipy.stats under mod_python. Check the mod_wsgi documentation to see if you can configure it such that it does not use multiple interpreters in the same process, or find a different deployment strategy that uses one interpreter per process for the app.

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

Sidebar

Related Questions

Suppose that a process is creating a mutex in shared memory and locking it
I'm in the process of creating a class that stores metadata about a particular
In the process of creating a user interface code from UI file Qt creates
Is there a recommended process for creating reusable ASP.NET assemblies that contain UserControls that
I am in the process of creating a bash script that would log into
I am in the process of creating a Java program that goes on the
I'm in the process of creating an app that would use iCal format calendars,
I'm designing a long running process, triggered by a Django management command, that needs
I'm creating a Django project that will be used by multiple domains, and the
I'm in the process of creating an android app that makes extensive use of

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.