Eclipse Pydev:'Error:Python stdlib not found' [英] Eclipse Pydev: 'Error: Python stdlib not found'

查看:1621
本文介绍了Eclipse Pydev:'Error:Python stdlib not found'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试添加一个解释器(使用virtualenv创建)到PyDev,但是我收到以下错误:

I am trying to add an interpreter (created using virtualenv) to PyDev but I get the following error:


Python / Lib文件夹
(包含标准库)

安装过程中未找到/选择。

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

此文件夹(包含诸如threading.py和traceback.py之类的
的文件)是PyDev正确运行
所需的
(它必须包含
实际的源文件。 pyc
文件)...

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

请注意,如果这是一个virtualenv
安装,/ base文件夹从
安装需要选择(不同于
的网站包是
可选)...

Note that if this is a virtualenv install, the /Lib folder from the base install needs to be selected (unlike the site-packages which is optional)...

问题是在我的默认安装下没有/ lib文件夹...我使用'no-site-packages'选项创建了virtualenv ...如何解决?谢谢!

The problem is that there is no /lib folder under my default installation... I created the virtualenv with the 'no-site-packages' option... How can I solve? thanks!

推荐答案

我以前碰到过这个。当添加在PyDev中使用virtualenv创建的解释器时,当它要求需要添加到SYSTEM pythonpath的文件夹时,我必须选择

/ usr / lib / python2。 7

/usr/lib/python2.7/lib-tk

/usr/lib/python2.7/plat-linux2

看到屏幕截图我必须做什么。这里 temp 是我的virtualenv。

I've come across this myself before. When adding an interpreter created using virtualenv in PyDev, when it asks for the folders that need to be added to the SYSTEM pythonpath, I had to select
/usr/lib/python2.7
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/plat-linux2
See the screenshot for what I had to do. Here temp is my virtualenv.

即使添加了系统Python目录,PyDev也没有收到全球网站包,所以你仍然实现无站点包的效果。我假设你必须在Windows上做类似的操作,即选择选择需要对话框中的所有文件夹,包括 C:\Pythonx.x 文件夹。

Even though the system Python directory was added, PyDev did not pick up the global site packages, so you still achieve the "no-site-packages" effect. I'm assuming you would have to do something similar on Windows i.e. select all the folder in the "Select Needed" dialog, including the C:\Pythonx.x folder.

编辑:我刚刚在Eclipse Indigo(Arch Linux with virtualenv 1.7)中使用PyDev 2.3进行了测试,似乎 plat-linux2 不需要选择(不确定 lib-tk ,但 / usr / lib / python2.7 是必须的)。感谢fijiaaron指出它。

EDIT: I just tried it out with PyDev 2.3 on Eclipse Indigo (Arch Linux with virtualenv 1.7), and it seems that plat-linux2 does not need to be selected (not sure about lib-tk, but /usr/lib/python2.7 is definitely required). Thanks fijiaaron for pointing it out.

编辑2 :Pydev 2.5(也可能是2.6, / Lib 文件夹正常运行,尽管现在可以忽略它,但文档中的.org / manual_101_interpreter.htmlrel =noreferrer>仍然需要Python stdlib未找到对话框,并添加解释器(但提到它仍然需要包括在后面)。

EDIT 2: Pydev 2.5 (and probably 2.6 too, from the docs) still requires the /Lib folder to function properly, though it now lets you ignore the "Python stdlib not found" dialog and add the interpreter anyway (but mentions that it still needs to be included later).

这篇关于Eclipse Pydev:'Error:Python stdlib not found'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆