newbie: cannot import name error

Alex Martelli aleax at aleax.it
Fri Sep 7 10:02:50 EDT 2001


"rjberman at NOSPAMrodessaNOSPAM.com" <Bob Berman> wrote in message
news:rb999869338 at rodessa.com...
> I am brand new to Python, but have been writing Perl scripts for
> the last 10 yrs. or so. I want to see how Python compares to Perl
> and if it lives up to its hype.
>
> Anyway, I installed Python version "1.6a2 (#1, Jun  1 2000, 13:24:17)
> [GCC 2.96 20000306 (experimental)] on sunos5" on Sparc Solaris 8. It

Note that the version code indicates an *alpha* version (albeit
alpha-2), as well as a pretty old version (1.6) which was NOT
long-lived (it was a "contractual obligation" version the Python
team had to do before changing employers) *and* an experimental
C compiler too -- what an explosive mix!

> It seems like the module distutils.core is found, just not the
> name "Extension".

Maybe the distutils didn't yet have Extension back in the
time of 1.6 alpha 2.  Wouldn't surprise me.

> Can someone help me? I can't believe that on my second encounter
> with Python I've already been stumped! This is not a good first
> impression. Any help would be appreciated or even pointers to help!

Do you generally try to gain a "first impression" of any
software by installing an 18-months-old alpha release?-)
I wouldn't be surprised to "be stumped" if I did that:).

I would suggest you start by installing a solid, current,
stable release, such as:
http://aspn.activestate.com/ASPN/Downloads/ActivePython/Download?OS=Solaris&
version=2.1.1&build=212&download=/ActivePython/solaris/2.1/ActivePython-2.1.
1-212.tar.gz

Apparently, this ActivePython 2.1.1 release supports Solaris 2.6 --
I don't know if that may give problems with 2.8, as it's been a
long time since I did Solaris.  If the 2.8-vs-2.6 IS a problem,
then build and install from the source release:
http://prdownloads.sourceforge.net/python/Python-2.1.1.tgz
(I would also suggest using a recent, stable C compiler,
such as gcc 3.0.1, of course -- http://gcc.gnu.org/gcc-3.0/ --
but I guess the key thing is using the same C compiler to
build Python as to build extensions, just in case any
incompatibility in generated binaries or libraries used
may have appeared between C compilers and/or versions).


Alex






More information about the Python-list mailing list