Configure InterpreterAfter installing it, the first thing you must do is configure the Python and/or Jython and/or IronPython interpreter. 1. Go to: window > preferences > PyDev > Interpreter - (Python/Jython/IronPython). 2. Choose the interpreter you have installed in your computer (such as python.exe, jython.jar or ipy.exe). Note that the Auto Config will try to find it in your PATH, but it can fail if it's not there (or if you On Windows it'll also search the registry and provide a choice based on the multiple interpreters available On Linux/Mac, usually you can do a 'which python' to know where the python executable is located. On Mac it's usually at some place resembling the image below (so, if you want to configure a different version
IMPORTANT: Select only folders that will NOT be used as source folders for any project of yours IMPORTANT for Mac users: The Python version that usually ships with Mac doesn't seem to have the .py source files After those steps, you should have a screen as presented below: How to check if the information was correctly gottenThe System libs must contain at least the Lib and the Lib/site-packages directory. The Forced builtin libs must contain the modules built into the interpreter (and others whose What if it is not correct? The most common error is having a problem in the environment variables used from the shell that spawned Eclipse, Usually running (from the command prompt) the file that gives that info for PyDev can help you discovering the That file is usually located at: eclipse\plugins\org.python.pydev_$version$\pysrc\interpreterInfo.py, python.exe interpreterInfo.py java.exe -cp c:\path\to\jython.jar org.python.util.jython interpreterInfo.py ipy.exe interpreterInfo.py If you're unable to find out what's going on, please ask in the users forum (giving the output obtained from What if I add something new in my System PYTHONPATH after configuring it? If you add something to your python installation, you need to either Note that if you added a library that's already under a folder in the PYTHONPATH, you have to at least go to LibrariesThe System libs are the libraries that will be added to the PYTHONPATH of any project that is using this interpreter. For Python and IronPython, it's composed of folders, zip files and egg files. Note that if dlls should be added to For Jython, it's composed of folders and jars. Forced Builtins The Forced builtin libs are the libraries that are built-in the interpreter, such as _builtin_, sha, etc or For Python, you should have around 50 entries For Jython around 30 entries. For IronPython more than 100 entries. All the packages built into .NET should be included here – e.g.: Additionally, you may add other libraries that you want to treat as Predefined Completions Predefined completions are completions acquired from sources that provide only the interfaces for A predefined completion module may be created by having a module with the extension ".pypredef" Example for a my.source.module (must be declared in a my.source.module.pypredef file): MyConstantA = int MyConstantB = int class MyClass: instanceAttribute = QObject def __init__(self, parent=None): ''' @type parent: QObject ''' def registerTimer(interval, object): ''' @type interval: int @type object: QObject ''' return int Note 1: the name of the file is the exact name of the module Note 2: .pypredef files are not searched in subfolders Optionally a QScintilla .api file may be added. When this is done, PyDev will try to create Environment The variables defined at the environment will be set as environment variables when running a script that uses the String substitution variablesStrings defined here may be used in:
They can be used in those places in the format: ${DECLARED_VARIABLE} Cygwin users PyDev currently has no support for cygwin. Currently you'll be able to configure the interpreter |
|