Re: ImportError: No module named re
"Stefan Richthofer" <[email protected]> Fri, 24 Jun 2016 13:28:13 +0200
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <trinity-f35299a3-89f5-4dff-b617-be88413d02ea-1466767693258@3capp-gmx-bs79> |
Hello Ranga, this looks like in your command-line Jython-launch cannot find its lib-folder/doesn't have Jython-path configured properly. You should first identify the location of Jython's lib-folder (the folder containing the .py-files making up the major part of the standard lib). Then - you can check via import sys; print sys.path whether that folder is on the path. - you can verify if the problem is cured by manually adding that path via sys.path.append - you can fix you Jython-path configuration by providing the environment variable JYTHONPATH to the jvm (see jython --help) - I guess things get easier or issue might be self-soved if you call Jython via its launcher rather than manually via java-command. - finally you can consider how to solve this for distribution, e.g. by distributing jython-standalone (which contains the lib folder) or by providing an installer or launcher that makes sure the path is configured correctly for the user Hope this somewhat helps. Best Stefan Gesendet: Freitag, 24. Juni 2016 um 12:17 Uhr Von: "Ranga Babu Mandada" <[email protected]> An: "[email protected]" <[email protected]> Betreff: [Jython-users] ImportError: No module named re Hello, I am using Jython in java application to run python scripts. I am using jython-standalone-2.5.2 as a dependency in pom.xml in maven project. when I run the application in IDE the script is running without problems. But when I run the application from command line using java -jar application.jar I get the following error ImportError: No module named re. Please help me in fixing the issue. Regards, Ranga Babu ------------------------------------------------------------------------------ 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. http://sdm.link/attshape_______________________________________________ Jython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-users ------------------------------------------------------------------------------ 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. http://sdm.link/attshape _______________________________________________ Jython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-users