I am new to Python. I wanted to try out the itertools package from Python. But I got the error:
NameError: global name 'itertools' is not defined
How to resolve this error? Do I need to install this module?
I have included from itertools import *
.
How to install this module? Where do I find the itertools
module/package? I searched on google but it kept referring to documentation page of itertools
.
I am using Debian 6. I have Python 2.6.
import itertools
instead offrom itertools import *
and it worked fine. Any idea why this is so?redhat distros
I recommend usingyum
to install python packages. if you are missing the package, then I would recommend an install via debian's package manager.