Thanks Thimo for the quick answer.

Search path is set correctly and if I enter "import urllib" if works just
fine, no problem.

But Cisco YDK-Py is a comprehensive package written to support both Py2 and
Py3 syntax and as a result it uses the six package. In turn, six calls
"from pkg_resources.extern.six.moves import urllib, map, filter" and this
is the point where things get wrong...

[image: Inline image 1]

I get the same error with the import statement "from six.moves import
urllib"

Laszlo

On Fri, Jul 15, 2016 at 6:32 AM, Langbehn, Thimo <t.langb...@euroimmun.de>
wrote:

> Hello Laszlo,
>
> > I wrote an application in c# using IronPython to host Python scripts. As
> I am mainly targeting the app for scripting Cisco routers, I wanted to use
> Cisco YDK-Py library. But when I try to open a sample script I get the
> error in subject.
>
> urllib is part oft the IronPython library and should be available. You can
> check that by opening  „ipy“ and entering „import urllib“.
> If that works, it might be that your application did not set up the module
> search path correctly, or it might have been changed by the skript. The
> module search path resides in sys.path [1] (import sys) and should contain
> the „Lib“ directory of your IronPython installation.
>
> > Already tried "ipy -x:Frames -m ensurepip" - whatever it supposed to do
> - but the issue stays, however the command succeeded.
>
> „ipy –m ensurepip“ starts IronPython and executes an integrated module
> that installs the pip Package manager.
>
> Cheers,
>
> Thimo
>
> [1]
> https://docs.python.org/2/tutorial/modules.html?highlight=__all__#the-module-search-path
>
>
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to