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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:32:08+00:00 2026-05-25T00:32:08+00:00

I have deployed a django project on a server running under debian lenny. Every

  • 0

I have deployed a django project on a server running under debian lenny. Every time it starts up the following warning pops up:

/var/www/environment/XXX/src/django-pytest/django_pytest/test_runner.py:3: UserWarning: Module _mysql was already imported from /usr/lib/pymodules/python2.6/_mysql.so, but /usr/lib/pymodules/python2.6 is being added to sys.path
  from pkg_resources import load_entry_point

There is more than one Django project on that particular server, each running inside their own virtualenv (with Python packages installed via pip). However, they also access the system-wide site-packages (which are installed via apt-get install).

This particular project has the following Python packages:

$ /var/www/environment/XXX/bin/pip freeze --local
Django==1.2.4
Fabric==0.9.4
South==0.7.3
distribute==0.6.10
django-pagination==1.0.7
-e git+http://github.com/galileo-press/django-pytest.git@7c1fa0180ca16c129850de3c3d912cd369fba687#egg=django_pytest-0.1.4-py2.6-dev
django-sorting==0.1
django-templatetag-sugar==0.1
paramiko==1.7.6
py==1.4.3
pycrypto==2.3
pytest==2.0.0

Under debian python-mysqldb 1.2.2-10+b1 is installed and the files live in

$ apt-file list python-mysqldb
python-mysqldb: /usr/lib/pyshared/python2.5/_mysql.so
python-mysqldb: /usr/lib/pyshared/python2.6/_mysql.so
python-mysqldb: /usr/share/pyshared/MySQL_python-1.2.2.egg-info/PKG-INFO
python-mysqldb: /usr/share/pyshared/MySQL_python-1.2.2.egg-info/SOURCES.txt
python-mysqldb: /usr/share/pyshared/MySQL_python-1.2.2.egg-info/dependency_links.txt
python-mysqldb: /usr/share/pyshared/MySQL_python-1.2.2.egg-info/top_level.txt
python-mysqldb: /usr/share/pyshared/MySQLdb/__init__.py
...

Although this is only a minor annoyance, I really like to fix this.

Can anyone help?

Update: Here’s the output from yolk:

Cheetah         - 2.4.2.1      - active development (/usr/lib/pymodules/python2.6)
Django          - 1.2.3        - non-active development (/usr/lib/pymodules/python2.6)
Django          - 1.2.4        - active 
Fabric          - 0.9.4        - active 
Jinja2          - 2.5.5        - active development (/usr/lib/pymodules/python2.6)
Logbook         - 0.3          - active development (/usr/local/lib/python2.6/dist-packages/Logbook-0.3-py2.6-linux-x86_64.egg)
MarkupSafe      - 0.9.2        - active development (/usr/lib/python2.6/dist-packages)
MySQL-python    - 1.2.2        - active development (/usr/lib/pymodules/python2.6)
PIL             - 1.1.7        - active development (/usr/lib/python2.6/dist-packages/PIL)
Python          - 2.6.6        - active development (/usr/lib/python2.6/lib-dynload)
South           - 0.7.3        - active 
boto            - 1.9b         - active development (/usr/lib/pymodules/python2.6)
distribute      - 0.6.10       - active 
distribute      - 0.6.14       - non-active development (/usr/lib/python2.6/dist-packages)
django-pagination - 1.0.7        - active 
django-pytest   - 0.1.4        - active development (/var/www/environment/XXX/src/django-pytest)
django-sorting  - 0.1          - active 
django-templatetag-sugar - 0.1          - active 
flup            - 1.0.2        - active development (/usr/lib/pymodules/python2.6)
lxml            - 2.2.8        - active development (/usr/lib/python2.6/dist-packages)
mercurial       - 1.6.4        - active development (/usr/lib/pymodules/python2.6)
paramiko        - 1.7.6        - active 
pip             - 0.7.2        - active 
psycopg2        - 2.2.1        - active development (/usr/lib/python2.6/dist-packages)
py              - 1.3.3        - non-active development (/usr/lib/pymodules/python2.6)
py              - 1.4.1        - non-active 
py              - 1.4.3        - active 
pycrypto        - 2.3          - active 
pytest          - 2.0.0        - active 
python-amazon-product-api - 0.2.5a1      - active development (/var/www/environment/XXX/src/amazonproduct)
python-amazon-product-api - 0.2.5a1      - active development (/var/www/environment/XXX/src/amazonproduct)
python-amazon-product-api - 0.2.5a1      - non-active development (/usr/local/lib/python2.6/dist-packages/python_amazon_product_api-0.2.5a1-py2.6.egg)
python-amazon-product-api - 0.2.5a1      - non-active development (/usr/local/lib/python2.6/dist-packages/python_amazon_product_api-0.2.5a1-py2.6.egg)
python-dateutil - 1.4.1        - active development (/usr/lib/pymodules/python2.6)
setuptools      - 0.6c11       - active development (/usr/lib/python2.6/dist-packages)
stdeb           - 0.6.0        - active development (/usr/lib/pymodules/python2.6)
virtualenv      - 1.4.9        - active development (/usr/lib/pymodules/python2.6)
web.py          - 0.34         - active development (/usr/lib/pymodules/python2.6)
wsgiref         - 0.1.2        - active development (/usr/lib/python2.6)
yolk            - 0.4.1        - active 

Update 2: My sys.paths are:

/var/www/environment/XXX/bin/python -c "import sys; print '\n'.join(sys.path)"

/var/www/environment/XXX/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg
/var/www/environment/XXX/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg
/var/www/environment/XXX/src/django-pytest
/var/www/environment/XXX/src/amazonproduct
/var/www/environment/XXX/lib/python2.6
/var/www/environment/XXX/lib/python2.6/plat-linux2
/var/www/environment/XXX/lib/python2.6/lib-tk
/var/www/environment/XXX/lib/python2.6/lib-old
/var/www/environment/XXX/lib/python2.6/lib-dynload
/usr/lib/python2.6
/usr/lib64/python2.6
/usr/lib/python2.6/plat-linux2
/usr/lib/python2.6/lib-tk
/usr/lib64/python2.6/lib-tk
/var/www/environment/XXX/lib/python2.6/site-packages
/usr/local/lib/python2.6/dist-packages/Logbook-0.3-py2.6-linux-x86_64.egg
/usr/lib/python2.6/dist-packages/PIL
/usr/local/lib/python2.6/dist-packages/python_amazon_product_api-0.2.5a1-py2.6.egg
/usr/lib/pymodules/python2.6
/usr/local/lib/python2.6/site-packages
/usr/local/lib/python2.6/dist-packages
/usr/lib/python2.6/dist-packages

When doing the same with python manage.py shell I get the same list with the exception of

/usr/lib64/python2.6

missing.

  • 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-25T00:32:09+00:00Added an answer on May 25, 2026 at 12:32 am

    I have simply removed django_pytest from INSTALLED_APPS. The problem is now gone. Not nice but it works ™.

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

Sidebar

Related Questions

I have deployed a new build on Production server, but I dont see the
I'm writing a django project, and I need to have a parallel thread which
We have a couple of Django applications deployed on the same subdomain. A few
We have a web based application in production built using django. It is deployed
I have deployed ASP.NET web site and ASP.NET web service on the same web
I'm familiar with the LAMP stack and over the years have successfully deployed a
I have an application deployed into multiple zones and there are some issues with
I have a application deployed through clickonce, but How can I modify the config
I have a ClickOnce deployed application I want to launch from VBScript, similar to
I have a web application deployed in an internet hosting provider. This web application

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.