Re: Modules are not found when importing Python in Jython
Jeff Mitchell <[email protected]> Mon, 12 Feb 2018 11:42:06 -0500
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <CAAdVdyjmD4tOCfe32NUJBB0QN39G_Rb0Xb82QV7ahWObiYr_wQ@mail.gmail.com> |
If you're running inside a WAR or EAR, it can be tricky to know what module path to include in your sys.path .. at least, I find it so. (ie: Storing modules in Web-content, and exploded paths by a container, etc) I tend to have a config file that I pull in as part of bootstrapping, which appends various path to sys.path or the CLASSPATH. Perhaps try printing our your paths, and making sure the pu modules and .jar dependencies are in there, or adding some paths. jeff On Mon, Feb 12, 2018 at 11:34 AM, Parastoo Delgoshaei < [email protected]> wrote: > Greetings, > > I am trying to use a Python class in my Jython code. The Python code works > fine by itself and is using some modules such as matplotlib. However, when > I attempt to import it in my Jython code, I get the error: > > > 'No module named matplotlib'. > > > I, also, have added the path to Python site-packages to my classpath and > still did not see the issue resolved. > > Thank you > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jython-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jython-users > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-users