From: Stefan R. <Ste...@gm...> - 2016-06-24 11:28:32
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>Hello Ranga,</div> <div> </div> <div>this looks like in your command-line Jython-launch cannot find its lib-folder/doesn't have Jython-path configured properly.</div> <div>You should first identify the location of Jython's lib-folder (the folder containing the .py-files making up the major</div> <div>part of the standard lib). Then</div> <div>- you can check via import sys; print sys.path whether that folder is on the path.</div> <div>- you can verify if the problem is cured by manually adding that path via sys.path.append</div> <div>- you can fix you Jython-path configuration by providing the environment variable JYTHONPATH to the jvm (see jython --help)</div> <div>- I guess things get easier or issue might be self-soved if you call Jython via its launcher rather than manually via java-command.</div> <div>- finally you can consider how to solve this for distribution, e.g. by distributing jython-standalone</div> <div>(which contains the lib folder) or by providing an installer or launcher that makes sure the path is configured correctly for the user</div> <div> </div> <div>Hope this somewhat helps.</div> <div>Best</div> <div> </div> <div>Stefan</div> <div> </div> <div> </div> <div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 24. Juni 2016 um 12:17 Uhr<br/> <b>Von:</b> "Ranga Babu Mandada" <Ran...@ip...><br/> <b>An:</b> "jyt...@li..." <jyt...@li...><br/> <b>Betreff:</b> [Jython-users] ImportError: No module named re</div> <div name="quoted-content"><!--p { margin-top: 0.0px; margin-bottom: 0.0px; } --> <div style="font-size: 12.0pt;color: rgb(0,0,0);background-color: rgb(255,255,255);font-family: Calibri , Arial , Helvetica , sans-serif;"> <p> </p> <div style="font-size: 12.0pt;color: rgb(0,0,0);background-color: rgb(255,255,255);font-family: Calibri , Arial , Helvetica , sans-serif;"><span style="font-size: 12.0pt;">Hello, </span> <div> <p> </p> <p>I am using Jython in java application to run python scripts. I am using <span style="font-size: 12.0pt;">j</span><span style="font-size: 12.0pt;">ython-standalone-2.5.2 as a dependency in pom.xml in maven project.</span></p> <p><span style="font-size: 12.0pt;">when I run the application in IDE the script is running without problems.</span></p> <p>But when I run the application from command line using<span style="color: rgb(255,0,0);"> java -jar application.jar <span style="color: rgb(0,0,0);">I get the following error</span></span></p> <p><span style="color: rgb(255,0,0);"><span style="color: rgb(0,0,0);">ImportError: No module named re​.</span></span></p> <p> </p> <p><span style="color: rgb(255,0,0);"><span style="color: rgb(0,0,0);">Please help me in fixing the issue.</span></span></p> <p> </p> <div id="Signature"> <div style="font-family: Calibri , Arial , Helvetica , sans-serif;margin: 0;">Regards,<br/> Ranga Babu<br/> </div> </div> </div> </div> ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. <a href="http://sdm.link/attshape_______________________________________________" target="_blank">http://sdm.link/attshape_______________________________________________</a> Jython-users mailing list Jyt...@li... <a href="https://lists.sourceforge.net/lists/listinfo/jython-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/jython-users</a></div> </div> </div> </div> </div></div></body></html> |