gpt4 book ai didi

python - PyDev Eclipse Python 解释器错误 : stdlib not found

转载 作者:IT老高 更新时间:2023-10-28 22:20:14 25 4
gpt4 key购买 nike

我一直在尝试使用 Eclipse 3.6 作为 Python 编辑器。我安装了最新版本的 PyDev,然后尝试在我的 mac 上设置首选项的 Interpreter - Python 字段。

我的python版本是2.6,路径是“/usr/bin/python”。当我输入此内容并选择要添加到系统 PYTHONPATH 的项目时,我收到以下错误消息:

Error: Python stdlib not found

It seems that the Python /Lib folder (which contains the standard library) was not found /selected during the instal process.

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) ...

所以我不能告诉 eclipse 解释器路径!任何帮助都会很棒!(我已经尝试重新安装 PyDev,没有运气)

谢谢!

根据 Praveen 的回答,我的 python 库位于/library/python/2.6/site-packages 中。当我在解释器字段中输入/usr/bin/python 时,eclipse 会询问我想将哪些路径添加到我的系统 PYTHONPATH 中。复选框项目之一正是该路径。所以我检查了它,以及其他框。单击确定,我得到同样的错误。

最佳答案

遇到了同样的问题。 Eclipse 不会使用默认安装的 python (2.6) 找到所有必需的路径。我下载了python 2.7,完成了安装。我的新“which python”路径变成了:

/Library/Frameworks/Python.framework/Versions/2.7/bin/python.

当我这次尝试设置解释器时,指定了这个路径,它就通过了。

注意:

  1. 浏览到/Library/Frameworks/Python.framework/Versions/2.7/bin目录
  2. 选择已安装的 python 解释器。有时,当前解释器(例如 python3)不存在“python”链接

关于python - PyDev Eclipse Python 解释器错误 : stdlib not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5595276/

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