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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:31:36+00:00 2026-06-16T00:31:36+00:00

I have python-matplotlib and python-mpltoolkits.basemap installed from Ubuntu packages. Installing python-mpltoolkits.basemap also installs python-dap

  • 0

I have python-matplotlib and python-mpltoolkits.basemap installed from Ubuntu packages. Installing python-mpltoolkits.basemap also installs python-dap as a dependency.

When I import basemap, I get this warning:

>>> import mpl_toolkits.basemap
/usr/lib/pymodules/python2.7/mpl_toolkits/__init__.py:2: UserWarning: Module dap was
already imported from None, but /usr/lib/python2.7/dist-packages is being added to sys.path
  __import__('pkg_resources').declare_namespace(__name__)

What does this mean?

EDIT 1:

>>> import sys
>>> print sys.modules['dap']
<module 'dap' (built-in)>

EDIT 2:

$ python -S
Python 2.7.3 (default, Sep 26 2012, 21:53:58) 
[GCC 4.7.2] on linux2
>>> import sys
>>> print sys.modules['dap']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: 'dap'

EDIT 3: yes I seem to have sitecustomize.py:

$ cat /etc/python2.7/sitecustomize.py
# install the apport exception handler if available
try:
    import apport_python_hook
except ImportError:
    pass
else:
    apport_python_hook.install()

EDIT 4: actually I can get the error by:

>>> import pkg_resources
__main__:1: UserWarning: Module dap was already imported from None, but /usr/lib/python2.7/dist-packages is being added to sys.path

so this has nothing to do with mpl_toolkits.basemap as such.

  • 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-16T00:31:37+00:00Added an answer on June 16, 2026 at 12:31 am

    I can’t really say that I’d understand the details, but apparently whenever the package python-dap is installed, then trying to import pkg_resources gives this warning. Here is some discussion.

    Following advice from here (comment 29 at the end of the page), I added dap as the first line in file /usr/lib/python2.7/dist-packages/dap-2.2.6.7.egg-info/namespace_packages.txt and get no more warnings. Hope this does not break anything.

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

Sidebar

Related Questions

I have installed numpy1.3,scipy 0.7.1,matplotlib 0.99.1.1 and python 2.5 when I import pylab I
I have a problem getting matplotlib 1.0.0 to work in Python 2.5.2 ( Ubuntu
I have made a line graph in python with pyplot/matplotlib: import matplotlib.pyplot as plt
I have just started learning python/matplotlib/basemap and could really use some help. How do
I have some code: #!/usr/bin/env python import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt x
I have the following python MWE (code is explained below) #!/usr/bin/python from scipy import
I'm using Python with Matplotlib for drawing. I have two matrices (images in levels
I'm using matplotlib and Python 2.7 I have a MxN matrix of tuples, an
I have python script which downloads N number of images from website. I run
Ok so I have python 3.2 installed and I have cx_Freexe 4.2.3 installed. I

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.