我已经从 NuGet 安装了 IronPython 和 IronPython.StdLib。从有关该主题的其他帖子(例如this)中,我似乎可以简单地添加
clr.AddReference(IronPython.StdLib)
到我的 python 模块,然后可以使用 CPython 模块,例如“os”。但它不起作用。
使用上面的行,我收到以下错误:
"Could not add reference to assembly IronPython.StdLib"
如果我评论该行,则找不到“os”:
"No module named os"
如何让我的 python 脚本找到 NuGet 安装的 StdLib?