gpt4 book ai didi

python - PyDev 内容辅助 : 'The interpreter location found does not exist.'

转载 作者:行者123 更新时间:2023-11-30 23:29:37 25 4
gpt4 key购买 nike

我慢慢地使用 Python 提高了工作效率,并且想从 Spyder 迁移到 PyDev。我可以很好地运行我的代码,但是 Eclipse 的内容辅助 ([ctrl]+[space]) 功能不起作用 - 有什么想法吗?

当我运行代码([ctrl]+[F11])时,它执行得很好,当我打开交互式终端([alt]+[ctrl]+[enter],选择Python控制台)时,我的建议预计会出现(尽管 [ctrl]+[space] 仍然会出现此错误)。

工具提示中给出的完整错误是:

    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>

编辑: YerayDiazDiaz 的评论建议:

在 PyDev -> Interpreter -> Python 下,我有一个来自“Quick Auto-Config”的解释器。它的名称=“Python”和位置=“python”。图书馆看起来还不错。

我尝试删除它,并使用“New”添加解释器,其中我设置了“解释器名称:”=“System”,“解释器可执行文件”=“C:\Python27\python.exe”。这似乎添加了库,但现在我既不能运行我的代码(有关无效配置的错误,“解释器:找不到 python”),也不能使用代码完成(工具提示错误是“解释器:找不到 python”)。

如果我有两个解释器(来自快速自动配置的解释器和我自己的“系统”),那么我可以再次运行代码,但代码完成失败并出现原始错误。

我运行的是 Windows 7,64 位; Eclipse Kepler 服务版本 1; PyDev版本3.2.0.201312292215

最佳答案

好的,它现在似乎可以工作了——我必须创建一个新项目,对于新项目,一切都按预期工作。

使用“首选项 - PyDev - 解释器 - Python 解释器”下的“快速自动配置”似乎是罪魁祸首。相反,我执行“新建...”,单击“浏览”,找到我的 python.exe,然后选择它。如果我现在创建一个新的 PyDev 项目,代码完成将按预期工作。

关于python - PyDev 内容辅助 : 'The interpreter location found does not exist.' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21063924/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com