Thanks, Kenneth! I'm an old Fortran/C/MPI/OpenMP programmer, so I need a little extra help with this newer stuff.
The first easy_install got rid of the "easybuild" error; the second got rid of the vsc error. Judy From: [email protected] [mailto:[email protected]] On Behalf Of Kenneth Hoste Sent: Thursday, February 11, 2016 3:41 PM To: [email protected] Subject: Re: [easybuild] Warning from EasyBuild 2.6.0 Hi Judy, On 11/02/16 19:32, Gardiner, Judith wrote: Kenneth, I hate to ask stupid questions, but sometimes it can't be helped. How can I test the PRs? This is not a stupid question at all, don't worry. Python packaging is messy enough by itself, let alone bringing git & GitHub into the picture... In fact, in this particular case the testing isn't trivial at all, mostly because vsc-install is tricky to install (heh!) unless it's available in 'packaged' form through PyPI. A partial test can be performed using the script in attachment. This only uses the easybuild-framework PR, not the one for vsc-install. So, it's possible you'll still see a "Module vsc was already imported" warning, but the "Module easybuild was already imported" should no longer be there. The script assumes you're running Python 2.7.x, but it's trivial to adjust if you're using Python 2.6.x. Let us know what it spits out. As soon as the vsc-install PR is merged and the new vsc-install version is published on PyPI, the test should no longer spit out any warnings (with the 2nd run of 'eb --version'). regards, Kenneth Judy From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Kenneth Hoste Sent: Tuesday, February 09, 2016 5:18 AM To: [email protected]<mailto:[email protected]> Subject: Re: [easybuild] Warning from EasyBuild 2.6.0 Hi Judith, Thank you, that's helpful. The warnings should be solved by the changes being made in https://github.com/hpcugent/easybuild-framework/pull/1593 and https://github.com/hpcugent/vsc-install/pull/22 . regards, Kenneth On 05/02/16 16:33, Gardiner, Judith wrote: 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'] Judy From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Kenneth Hoste Sent: Friday, February 05, 2016 4:07 AM To: [email protected]<mailto:[email protected]> Cc: Stijn De Weirdt Subject: Re: [easybuild] Warning from EasyBuild 2.6.0 Hi Judith, We're looking into a solution for these warnings, both in vsc-base and EasyBuild, see also https://github.com/hpcugent/easybuild-framework/issues/1588 Can you provide us the output of the following command? python -c 'import sys;print sys.version;import vsc;print vsc.__path__;import easybuild;print easybuild.__path__' regards, Kenneth On 03/02/16 19:13, Kenneth Hoste wrote: Hi Judith, On 28/01/16 22:37, Gardiner, Judith wrote: [ruby01]$ eb --version /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 This is EasyBuild 2.6.0 (framework: 2.6.0, easyblocks: 2.6.0) on host ruby01.osc.edu. First of all, these warnings are harmless in the sense that everything will work even though they are being spit out. I agree they are ugly though, and we should try and get rid of them. The problem is that vsc-base was split up recently, into what vsc-base is now and vsc-install, which provides support for installing/testing vsc-* packages. This implies that the 'vsc' namespace is spread across two different directories now, and that "import vsc" in Python will result in reading vsc/__init__.py from two different places. Python (or setuptools?) thinks this is weird, and throws the warnings. Same applies to the 'easybuild' namespace, which is imported from two locations (framework & easyblocks). This is a well known issue, and there are workaround to just silence the warning [1,2], but that's probably not the best way to 'fix' this issue. We're actually getting it too on our systems, but not consistently, it depends on how you install EasyBuild (an I *think* also on the version of setuptools, but I'm not sure about that). I've opened an issue on this in the EasyBuild framework repository on GitHub [3], and tagged it to try and fix this by the next EasyBuild release. regards, Kenneth [1] http://stackoverflow.com/questions/7239518/module-pytz-was-already-imported [2] http://stackoverflow.com/questions/3861336/how-do-you-correct-module-already-loaded-userwarnings-in-python [3] https://github.com/hpcugent/easybuild-framework/issues/1588

