Re: Modules are not found when importing Python in Jython
"Stefan Richthofer" <[email protected]> Mon, 12 Feb 2018 20:05:38 +0100
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <trinity-8ad676aa-b09d-464c-9d84-f4c80c7844e8-1518462338886@3c-app-gmx-bs79> |
AFAIK matplotlib contains some C-extension code. This is currently not supported in Jython, JyNI is the way to go here. However, JyNI cannot load matplotlib as of this writing, but might support it in a future release. So maybe nothing is wrong with your paths, Jython just does not know what to do with a native library. -Stefan Gesendet: Montag, 12. Februar 2018 um 17:42 Uhr Von: "Jeff Mitchell" <[email protected]> An: "Parastoo Delgoshaei" <[email protected]> Cc: [email protected] Betreff: Re: [Jython-users] Modules are not found when importing Python in Jython 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 ------------------------------------------------------------------------------ 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