简体   繁体   中英

PyDev content assist: 'The interpreter location found does not exist.'

I'm slowly getting more productive with Python, and would like to move from Spyder to PyDev. I can run my code fine, but the content assist ([ctrl]+[space]) feature of Eclipse isn't working -- any ideas?

When I run the code ([ctrl]+[F11]), it executes fine, and when I open an interactive terminal ([alt]+[ctrl]+[enter], choose Python console), the suggestions I expect come up (though [ctrl]+[space] still gives this error).

The full error given in the tooltip is:

    The interpreter location found does not exist. <xml>
    <name>Python27</name>
    <version>2.7</version>
    <executable>python</executable>
    <lib>C:\Python27\lib\site-packages\control-0.6c-py2.7.
     egg</lib>
    <lib>C:\Python27\DLLs</lib>
    <lib>C:\Python27\lib</lib>
    <lib>C:\Python27\lib\lib-tk</lib>
    <lib>C:\Python27</lib>
    <lib>C:\Python27\lib\site-packages</lib>
    <lib>C:\Python27\lib\site-packages\FontTools</lib>
    <lib>C:\Python27\lib\site-packages\itk</lib>
    <lib>C:\Python27\lib\site-packages\win32</lib>
    <lib>C:\Python27\lib\site-packages\win32\lib</lib>
    <lib>C:\Python27\lib\site-packages\Pythonwin</lib>
    <lib>C:\Python27\lib\site-packages\wx-2.8-msw-unicode</lib>
    <lib>C:\Python27\python.exe</lib>
    <forced_lib>Image</forced_lib>
    <forced_lib>OpenGL</forced_lib>
    <forced_lib>__builtin__</forced_lib>
    <forced_lib>__main__</forced_lib>
    <forced_lib>_ast</forced_lib>
    <forced_lib>_bisect</forced_lib>
    <forced_lib>_bytesio</forced_lib>
    <forced_lib>_codecs</forced_lib>
    <forced_lib>_codecs_cn</forced_lib>
    <forced_lib>_codecs_hk</forced_lib>
    <forced_lib>_codecs_iso2022</forced_lib>
    <forced_lib>_codecs_jp</forced_lib>
    <forced_lib>_codecs_kr</forced_lib>
    <forced_lib>_codecs_tw</forced_lib>
    <forced_lib>_collections</forced_lib>
    <forced_lib>_csv</forced_lib>
    <forced_lib>_fileio</forced_lib>
    <forced_lib>_functools</forced_lib>
    <forced_lib>_heapq</forced_lib>
    <forced_lib>_hotshot</forced_lib>
    <forced_lib>_io</forced_lib>
    <forced_lib>_json</forced_lib>
    <forced_lib>_locale</forced_lib>
    <forced_lib>_lsprof</forced_lib>
    <forced_lib>_md5</forced_lib>
    <forced_lib>_multibytecodec</forced_lib>
    <forced_lib>_random</forced_lib>
    <forced_lib>_sha</forced_lib>
    <forced_lib>_sha256</forced_lib>
    <forced_lib>_sha512</forced_lib>
    <forced_lib>_sre</forced_lib>
    <forced_lib>_struct</forced_lib>
    <forced_lib>_subprocess</forced_lib>
    <forced_lib>_symtable</forced_lib>
    <forced_lib>_warnings</forced_lib>
    <forced_lib>_weakref</forced_lib>
    <forced_lib>_winreg</forced_lib>
    <forced_lib>array</forced_lib>
    <forced_lib>astropy</forced_lib>
    <forced_lib>astropy.units</forced_lib>
    <forced_lib>audioop</forced_lib>
    <forced_lib>binascii</forced_lib>
    <forced_lib>cPickle</forced_lib>
    <forced_lib>cStringIO</forced_lib>
    <forced_lib>cmath</forced_lib>
    <forced_lib>datetime</forced_lib>
    <forced_lib>email</forced_lib>
    <forced_lib>errno</forced_lib>
    <forced_lib>exceptions</forced_lib>
    <forced_lib>future_builtins</forced_lib>
    <forced_lib>gc</forced_lib>
    <forced_lib>hashlib</forced_lib>
    <forced_lib>imageop</forced_lib>
    <forced_lib>imp</forced_lib>
    <forced_lib>itertools</forced_lib>
    <forced_lib>marshal</forced_lib>
    <forced_lib>math</forced_lib>
    <forced_lib>mmap</forced_lib>
    <forced_lib>msvcrt</forced_lib>
    <forced_lib>nose</forced_lib>
    <forced_lib>nose.tools</forced_lib>
    <forced_lib>nt</forced_lib>
    <forced_lib>numpy</forced_lib>
    <forced_lib>operator</forced_lib>
    <forced_lib>os</forced_lib>
    <forced_lib>os.path</forced_lib>
    <forced_lib>parser</forced_lib>
    <forced_lib>pytest</forced_lib>
    <forced_lib>scipy</forced_lib>
    <forced_lib>signal</forced_lib>
    <forced_lib>socket</forced_lib>
    <forced_lib>strop</forced_lib>
    <forced_lib>sys</forced_lib>
    <forced_lib>thread</forced_lib>
    <forced_lib>time</forced_lib>
    <forced_lib>wx</forced_lib>
    <forced_lib>wxPython</forced_lib>
    <forced_lib>xxsubtype</forced_lib>
    <forced_lib>zipimport</forced_lib>
    <forced_lib>zlib</forced_lib>
    </xml>

Edit: comment suggestion of YerayDiazDiaz:

Under PyDev -> Interpreter -> Python I had a single interpreter there, from "Quick Auto-Config". It has Name="Python" and Location="python". Libraries seem OK.

I've tried removing it, and adding an interpreter with "New", where I've set "Interpreter Name:"="System", "Interpreter Executable"="C:\\Python27\\python.exe". This seems to add the libraries OK, but now I can neither run my code (Error about invalid configuration, "Interpreter: python not found") nor use the code completion (tooltip error is "Interpreter: python not found").

If I have both interpreters there (the one from Quick Auto-Config, and my own "System"), then I can run the code again, but code completion fails with the original error.

I'm running Windows 7, 64 bit; Eclipse Kepler Service Release 1; PyDev version 3.2.0.201312292215

OK, it seems to be working now -- I had to create a new project, and for the new project everything works as expected.

Using the "Quick Auto-Config" under "Preferences - PyDev - Interpreters - Python Interpreter" seems to be the culprit. Instead, I do "New...", click on Browse, find my python.exe, and select that. If I now create a new PyDev project, the code completion works as expected.

I was using Squish (with Python) for Automation of a Windows application. the code completion was having issues. During scripting when I select "Control" + "Enter", there was an error saying - “The interpreter location found does not exist”

Solution is as Below:

I followed the below steps and this solved the issue

(1) In Squish, go to “Edit” menu -> “Preferences” (in windows platform)

(2) In “Preferences” window, Select “PyDev” -> “Interpreter – Python”

(3) Remove all the entries on the right hand side and select “Auto Config”

(4) Save and re-start Squish – the issue will be gone and context assist will be seen during scripting

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM