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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:19:16+00:00 2026-06-17T02:19:16+00:00

There are two instances running uwgsi and nginx servers. Each hosts a Flask application.

  • 0

There are two instances running uwgsi and nginx servers. Each hosts a Flask application. Both are running on a Python 2.7.3 path. One of the servers throws an ImportError for the “import simplejson” statement. The interpreter on both servers will accept this import statement without complaint.

Here’s the source of application A:

  1 from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, views                                                                                                   
  2 import sys
  3 print sys.version
  4 print sys.path
  5 
  6 import os
  7 import functools
  8 import urllib,urllib2
  9 import simplejson
 10 from datetime import datetime, timedelta

And the source of application B:

  1 from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, views                                                                                                   
  2 
  3 import sys
  4 print sys.version          
  5 print sys.path             
  6 
  7 import simplejson  
  8 
  9 import functools

Here’s the sys.version and sys.path log output of server A:

2.7.3 (default, Aug  1 2012, 05:25:23) 
[GCC 4.6.3]
['/srv/www/A/env/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',     
'/srv/www/A/env/local/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg',
'/srv/www/A/env/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', 
'/srv/www/A/env/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg', 
'/srv/www/A/env/lib/python2.7', 
'/srv/www/A/20120910/src', 
'/usr/lib/python2.7', 
'/usr/lib/python2.7/plat-linux2', 
'/usr/lib/python2.7/lib-tk', 
'/usr/lib/python2.7/lib-old', 
'/usr/lib/python2.7/lib-dynload', 
'/srv/www/A/env/local/lib/python2.7/site-packages', 
'/srv/www/A/env/lib/python2.7/site-packages']
WSGI app 0 (mountpoint='notimportant.com|') ready in 1 seconds on interpreter 0x1b20420 pid: 11069

Here’s the sys.version and sys.path log output of server B:

2.7.3 (default, Aug  1 2012, 05:25:23) 
[GCC 4.6.3]
['/srv/www/B/env/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', 
'/srv/www/B/env/local/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg', 
'/srv/www/B/env/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', 
'/srv/www/B/env/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg', 
'/srv/www/B/env/lib/python2.7', 
'/srv/www/B/20130105/src', 
'/usr/lib/python2.7', 
'/usr/lib/python2.7/plat-linux2', 
'/usr/lib/python2.7/lib-tk', 
'/usr/lib/python2.7/lib-old', 
'/usr/lib/python2.7/lib-dynload', 
'/srv/www/B/env/local/lib/python2.7/site-packages', 
'/srv/www/B/env/lib/python2.7/site-packages']

Traceback (most recent call last):
  File "/srv/www/B/20130105/src/B.py", line 7, in <module>
    import simplejson
ImportError: No module named simplejson
unable to load app 0 (mountpoint='notimportant.com|') (callable not found or import error)

Any constructive ideas will be appreciated.

  • 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-06-17T02:19:17+00:00Added an answer on June 17, 2026 at 2:19 am

    simplejson is an external library; it is bundled with Python 2.6 and up as the json module.

    Just use import json instead of import simplejson, or install simplejson on server B too.

    If you replace your simplejson import with json, remember to fix any references in the file. Alternatively, import it like this:

    try:
        import simplejson
    except ImportError:
        import json as simplejson
    

    and it’ll use the stdlib json module, renamed, and all your references to simplejson will continue to work.

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

Sidebar

Related Questions

I have two instances of web server. One is running on port 3000 and
I'm debugging a Windows service which has two running instances, by attaching to both
I've got a duplicate content issue where there's two instances of my site indexed
There are two table s : one is the master and one the detail
There are two project in which I collaborate, they live in different servers, A
If I am running more than two instances of a server (using rackspace-cloud's ip
The two web service(rest) are running on separated JVM instances with its own authentication.
Here is the problem I'm running into. There's a huge legacy application that runs
We have a simple Webapp running on two Tomcat instances behind Apache (a Tomcat
I have an Azure web role with two instances. Both instances are ready -

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.