[IronPython] No Module named Zlib import error after installing DLL

Andrew Evans evans.d.andrew at gmail.com
Thu Jun 3 21:09:54 CEST 2010

Hello I thought I posted my previous messages to the list I guess not
*confused. I am using IronPython 2.6.1 the latest I believe. and IronPython
Zlib for 2.6

Iron Python is installed to C:\IronPython

Below is the more useful error message cheers

>>> import clr
>>> clr.AddReference("IronPython.Zlib")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: System.IO.IOException: Could not add reference to assembly
   at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.Call(Object[]
s, Boolean& shouldOptimize)
lSite site, CodeContext context, TFuncType func, T0 arg0)
System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite s
ite, T0 arg0, T1 arg1, T2 arg2)
   at IronPython.Runtime.PythonFunction.FunctionCaller`1.Call1(CallSite
site, Co
deContext context, Object func, T0 arg0)
rame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame
   at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0,
T1 a
   at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
   at IronPython.Compiler.PythonScriptCode.Run(Scope scope)

On Thu, Jun 3, 2010 at 11:51 AM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Thu, Jun 3, 2010 at 12:04 PM, Michael Foord
> <fuzzyman at voidspace.org.uk> wrote:
> > I haven't tried this, but I assume you have to add a reference to the
> > assembly before you can import from it. Try:
> >
> >     import clr
> >     clr.AddReference('IronPython.Zlib')
> >
> This shouldn't be necessary, as any DLL in the DLLs folder is
> automatically referenced, but it is worth trying. If it fails, it
> might provide a more useful error message.
> Andrew: You shouldn't have to set any environment variables to use
> IronPython.Zlib; I have a feeling that, for some reason, the DLL is
> failing to load. Which versions of IronPython and IronPython.Zlib are
> you using? What path is your IronPython installed to?
> - Jeff
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100603/6ef477e5/attachment.html>

More information about the Ironpython-users mailing list