Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annoying 'already imported' warnings #1588

Closed
boegel opened this issue Feb 3, 2016 · 7 comments
Closed

annoying 'already imported' warnings #1588

boegel opened this issue Feb 3, 2016 · 7 comments
Milestone

Comments

@boegel
Copy link
Member

boegel commented Feb 3, 2016

/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc/__init__.py:29:
UserWarning: Module vsc was already imported from
/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc/__init__.pyc,
but /usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_install-0.9.12-py2.6.egg is being added to sys.path

  import pkg_resources

/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc/__init__.py:29:
UserWarning: Module easybuild was already imported from 
/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/easybuild_framework-2.6.0-py2.6.egg/easybuild/__init__.pyc,
but /usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/easybuild_easyblocks-2.6.0-py2.6.egg is being added to sys.path

  import pkg_resources
@boegel boegel added this to the v2.7.0 milestone Feb 3, 2016
@boegel
Copy link
Member Author

boegel commented Feb 3, 2016

This warning is harmless, and there are workarounds available (e.g. http://stackoverflow.com/questions/3861336/how-do-you-correct-module-already-loaded-userwarnings-in-python), but we should try and get to the bottom of this and have a 'proper' fix...

The split of vsc-base into vsc-base/vsc-install made things worse, since the warning can now be spit out twice; once for the vsc namespace, and once for easybuild.

cc @JensTimmerman

@boegel
Copy link
Member Author

boegel commented Feb 3, 2016

It looks like this is simply a bug in the setup.py script, i.e. we should declare easybuild (and vsc) as a namespace package, see https://pythonhosted.org/setuptools/setuptools.html#namespace-packages

@stdweird
Copy link
Contributor

stdweird commented Feb 5, 2016

@boegel can you ask the person who can reproduce this to run

python -c 'import sys;print sys.version;import vsc;print vsc.__path__;import easybuild;print easybuild.__path__'

@boegel
Copy link
Member Author

boegel commented Feb 5, 2016

@stdweird: here it is:

[oakley02]$ python -c 'import sys;print sys.version;import vsc;print vsc.__path__;import easybuild;print easybuild.__path__'

2.6.6 (r266:84292, May 22 2015, 08:34:51)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)]

/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc/__init__.py:29: UserWarning: Module vsc was already imported from /usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc/__init__.pyc, but /usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_install-0.9.12-py2.6.egg is being added to sys.path

  import pkg_resources

['/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_base-2.4.16-py2.6.egg/vsc', '/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/vsc_install-0.9.12-py2.6.egg/vsc']

['/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/easybuild_framework-2.6.0-py2.6.egg/easybuild', '/usr/local/easybuild/2.6.0/software/EasyBuild/2.6.0/lib/python2.6/site-packages/easybuild_easyblocks-2.6.0-py2.6.egg/easybuild']

@boegel
Copy link
Member Author

boegel commented Feb 6, 2016

should be fixed (for easybuild) with #1591

@boegel
Copy link
Member Author

boegel commented Feb 6, 2016

#1591 was incomplete, and rolled back in #1592
new attempt in #1593

@boegel
Copy link
Member Author

boegel commented Mar 9, 2016

fixed with #1593, follow-up there

@boegel boegel closed this as completed Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants