Re: Ironpython 2.7.9 ImportException: 'No Module Named errno' when importing another module in .NET application

micoo@...
 

Thanks for the reply. I did a little more exploring this morning and I think Stéphane is probably right, or at the very least on the right path.

If I remove the following line:

searchPaths.Add($@"{pythonRootPath}\Lib\site-packages\");

I can run the following script with no issues where previously I was unable to import either of these packages without an import error:
engine.Execute(@"
    import os, json
    print os.getcwd()
    print json.dumps({'x': 1, 'y': { 'hello': 'world' }, 'z': True}, indent=4)");

So if I can't add the path my package is in to sys path...how can I import it? I've tried fully qualifying the path as "C:\python27\Lib\site-packages\jinja2" and that doesn't work.

Join users@ironpython.groups.io to automatically receive all group messages.