

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How we can import Python modules in Jython?
You can use pure python modules from jython. You can't use modules that are implemented in C. To use modules from your pip installs, you need to add the sys.path of python to that of Jython as Jython does not automatically pick up the PYTHONPATH information
Jython 2.5 introduced the JYTHONPATH environmental variable as Jython-equivalent of PYTHONPATH, so setting both to the same value should do the trick for most use cases (unless you're working in a setup with incompatible Python an Jython versions).
Now you can import python modules installed locally directly using 'import' in Jython.
- Related Questions & Answers
- How we can import Python modules without installing?
- Can we iteratively import python modules inside a for loop?
- How can I import modules for a Python Azure Function?
- How we can bundle multiple python modules?
- Python import modules from Zip archives (zipimport)
- Can we keep Python modules in compiled format?
- How to install and import Python modules at runtime?
- How to use multiple modules with Python import Statement?
- How we can copy Python modules from one system to another?
- How I can dynamically import Python module?
- How to import Python modules by default at the time of program starts?
- How can we display all modules with classloaders in Java 9?
- How do we use easy_install to install Python modules?
- How can we import a gson library in JShell in Java 9?
- How can we import data from .txt file into MySQL table?
Advertisements