Installing module: import error "No module named 'new'"
Skip Montanaro
skip at pobox.com
Sun Aug 5 15:46:17 EDT 2001
Sheila> ImportError: No module named new
Sheila> This has me really puzzled, as the docs for Python 2.0 list the
Sheila> new module in the Global Module Index, but when I look for that
Sheila> file in both my Windows machine and on my Linux web host, I do
Sheila> not fine it.
Sheila> How should I proceed at this point? Why isn't the "new" module
Sheila> available to me???
It probably is available, but isn't being built by default. While the new
module has no esoteric library or hardward dependencies that would dictate
it not be built for all platforms, it is a bit of a wizardly module, since
it allows you to create all sorts of Python objects you normally can't
create directly from Python code (functions, code objects, etc). In other
words, it is like a small howitzer, aimed directly at your foot, just
waiting for you to sneeze. ;-)
On Linux, check your Module/Setup file, uncomment the new module's line and
reexecute make. (I've no idea how you'd coax Windows into building it for
you.)
--
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/
More information about the Python-list
mailing list