Reputation: 11
I tried for an hour without any progress.
I'm using Eclipse Juno and the latest PyDev. Win 7. I installed Jython on E
disk. When I tried to configure the Jython interpreter route in PyDev (Preference -> PyDev -> Interpreter-Jython -> Add), I get the following error (in a giant pop-up):
Error: Python stdlib not found or stdlib found without .py files. It seems that the Python /lib folder (which contains the standard library) was not found/selected during the install process or the stdlib does not contain the required .py files (i.e.: only has .pyc files). This folder (which contains files such as threading.py and traceback.py) is required for PyDev to function properly, and it must contain the actual source files, not only .pyc files. if you don't have the .py files in your install, please use an install from python.org or grab the standard library for your install from there. If this is a virtualenv install, the /Lib folder from the base install needs to be selected (unlike the site-packages which is optional). What do you want to do? Note: if you choose to proceed, the /Lib with the standard library .py source files must be added later on, otherwise PyDev may not function properly.
And they're three options available:
Upvotes: 1
Views: 4605
Reputation: 1
Before configuring interpreter for jython, Please make sure to choose type of language as python/jython" in the new project folder.
Upvotes: 0
Reputation: 4755
The official install instructions did not quite work for me: http://www.jython.org/jythonbook/en/1.0/JythonIDE.html
Here are my findings how to make Jython run in Eclipse (I am using Kepler 4.3.1.M20130911-1000, PyDev 2.7.5.2013052819):
download jython standalone jar (e.g. versions 2.5.3 or 2.7-b1)
hint: the Eclipse PyDev distributed pydev-jython.jar seems not a valid jython distro
(e.g. eclipse/plugins/org.python.pydev.jython_2.7.5.2013052819/pydev-jython.jar
)
NoClassDefFoundError: org/python/pydev/core/ObjectsPool$ObjectsPoolMap
(which is actually included in e.g. eclipse/plugins/org.python.pydev_2.7.5.2013052819/core.jar
)...
Window->Preferences->PyDev->Interpreter Jython->New-> select jython-standalone-xxx.jar
deselect all suggested folders (you could add them later if needed)
ignore warning (mentioned in question above) and select Proceed anyways
/Lib
folder cannot be found because it is packaged within the standalone jar (jython-standalone-xxx.jar!/Lib
) which may be ok later on...
adjust your newly created or existing projects to use this interpreter:
->Properties->PyDev - Interpreter/Grammar->Jython
Upvotes: 4
Reputation: 103
I do not know how Jython behaves on Windows, so this is just a wild guess:
First time you run Jython, it usually does some basic library configuration. Try running the Jython.jar on its own once before adding it to PyDev.
Upvotes: 0