Public bug reported:
An init script for using environment modules inside python is available
in the package but it doesn't work for me.
For example:
$ python
Python 2.7.6 (default, Jan 12 2014, 08:16:39)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> execfile('/usr/share/modules/init/python.py')
>>> module('list')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/share/modules/init/python.py", line 27, in module
(output, error) = subprocess.Popen(['/usr/bin/modulecmd' %
os.environ['MODULE_VERSION'], 'python'] +
TypeError: not all arguments converted during string formatting
when I was expecting this:
$ python
Python 2.7.6 (default, Jan 12 2014, 08:16:39)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> execfile('/usr/share/modules/init/python.py')
>>> module('list')
Currently Loaded Modulefiles:
>>>
Here are the versions I'm using
$ lsb_release -rd
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04
$ apt-cache policy environment-modules
environment-modules:
Installed: 3.2.10-8
Candidate: 3.2.10-8
Version table:
*** 3.2.10-8 0
500 http://www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu/ trusty/universe
amd64 Packages
100 /var/lib/dpkg/status
A small change to the init script /usr/share/modules/init.python.py
fixes this, I attach a diff.
** Affects: modules (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "fix-python-init"
https://bugs.launchpad.net/bugs/1271885/+attachment/3954959/+files/fix-python-init
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1271885
Title:
python initialisation not working
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/modules/+bug/1271885/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs