Why do I get “UserWarning: Module dap was already imported from None …”

前端 未结 3 2159
挽巷
挽巷 2021-02-19 19:14

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

3条回答
  •  梦谈多话
    2021-02-19 19:40

    I recently had to track down a similar problem, and the actual meaning of the error message:

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

    Appears to be "While extending the path for 'dap', found an egg-info directory that does not declare 'dap' to be a namespace package".

    This suggests two things: python-dap is missing a "namespace_packages=['dap']" declaration in its own setup.py, and setuptools really should give a better error message in this case...

提交回复
热议问题