Jython embedded in Java — ImportError: No module named yaml

女生的网名这么多〃 提交于 2019-12-11 02:42:23

问题


I am trying to embed Jython in Java because I need to be able to reuse some python code that is parsing a yaml. When I try to run the code below:

interp.exec("import sys");
interp.exec("print sys.version");
interp.exec("sys.path.append(\'C:/MyScripts\')");
interp.exec("import MyYAMLReader");

I get an error:

ImportError: No module named yaml

How can I resolve this? I am currently coding in Eclipse and have the jython2.7 jar. Is there anything else I need to be able to run this?

来源:https://stackoverflow.com/questions/30339439/jython-embedded-in-java-importerror-no-module-named-yaml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!