anybody using python 2.5 that raises error while importing?

John Machin sjmachin at lexicon.net
Sat Sep 23 10:22:16 EDT 2006


daniel wrote:
> John Machin wrote:
> > daniel wrote:
> > > there's a dll extension used to be imported with no error under version
> > > 2.4.3, but the new python complains that the name of the module can't
> > > be found. seems not mentioned in the official documentation, any work
> > > around to fix the issue without switching back to the old version?
> >
> thank you for your reply..
>
> > Did/does its name end in .dll or in .pyd?
> It ends in .dll
>
> > Have you procured a new one (necessary when there's a change of minor
> > version number) and installed it in the right place?
> My output of "python -V" shows 2.5c2

Huh? The question was in effect "Have you obtained a NEW version of the
*DLL*?" This is necessary when you upgrade from Python 2.4 to Python
2.5.

>
> > Can you tell us the name of the module, and the path to the DLL/PYD
> The dll is distributed with a third party library, it claimed to be
> compatible with 2.4, It was installed at "d:\" on my box, and the path
> had been added to my PYTHONPATH variable.

Do you mean that the full path to the module was
    d:\the_module_name.dll
?

>
> > that is/was imported by Python 2.4?
> yep, it works very well with python 2.4, so, I'm just wondering if
> there is a fix for using with 2.5

No, you can't use a 2.4-compatible binary module with 2.5.

>
> > Have you contacted the author(s) of the module?
> uh.. not yet, because they clearly mentioned that in the doc.

They clearly mentioned *what* in the doc?

Have they yet announced availibility of a 2.5-supported version of
their software?


> > Have you installed Python 2.5 in its own directory e.g. c:\python25
> > (the default)? Python 2.4, same question? Have you uninstalled 2.4?
> I already uninstalled the version 2.4. and put python25 in drive "d:".
> there's probably no problem with my environment variables, maybe I
> should check for a updated version of python.

Huh, again? Firstly, 2.5 final has been released -- you should really
subscribe to the python-announce mailing list so that you don't need to
"check for" major events.
Secondly, upgrading from 2.5c2 to 2.5 is generally a good thing, but it
won't solve your "missing dll" problem.

>From 2.5 onwards,  a Python extension module must be named .pyd, it
can't be named .dll. You could try renaming it, but you are likely to
get this error when you try to import it in 2.5:
    ImportError: Module use of python24.dll conflicts with this version
of Python.
IOW, the version compatibility problem.

Bottom line: you need to get an updated extension module from the
software supplier.

HTH,
John




More information about the Python-list mailing list