[英]PyDev with Virtualenv: Interpreter not found
I am having trouble getting PyDev to work with Virtualenv. 我无法让PyDev与Virtualenv一起使用。 I have: 我有:
virtualenv venv
in the project directory to create a Virtualenv environment. 在项目目录中发出virtualenv venv
以创建Virtualenv环境。 venv
directory. 删除了我在第一步中添加的标准解释器,并尝试添加位于我的venv
目录中的标准解释器。 But I can not seem to get it to work. 但我似乎无法使其正常工作。 In more detail: 更详细地:
All directories in my PythonFlaskTemplate PyDev project: 我的PythonFlaskTemplate PyDev项目中的所有目录:
The result when I try to add the interpreter in my venv
directory as well as the necessary libraries there. 当我尝试在venv
目录以及那里的必需库中添加解释器时的结果。 Did I miss any library directory which I should have picked? 我是否错过了我应该选择的任何图书馆目录? Did I pick a directory I should not have picked? 我是否选择了我不应该选择的目录?
And I still get an error saying that it can not find an interpreter. 而且我仍然得到一个错误,说它找不到解释器。 Even though the interpreter path I picked is correct (I can start it by ./venv/bin/python2.7
): 即使我选择的解释器路径是正确的(我也可以通过./venv/bin/python2.7
来启动它):
How should I configure PyDev to make it play nicely with Virtualenv? 我应该如何配置PyDev以使其在Virtualenv中很好地播放?
The problem there seems to be that you configured your project not to use the 'default' interpreter, but to use an interpreter which has to be named 'python'. 那里的问题似乎是您配置的项目不使用“默认”解释器,而是使用必须命名为“ python”的解释器。
You can fix that by changing the name of the interpreter in the interpreter preferences (ie: preferences > pydev > interpreters > python interpreter > double click it and type 'python') 您可以通过在解释器首选项中更改解释器的名称来解决此问题(即:首选项> pydev>解释器> python解释器>双击并键入“ python”)
Or you can set your project to use the default interpreter (ie: select project > alt + enter > pydev - interpreter/grammar > interpreter: Default). 或者,您可以将项目设置为使用默认解释器(即:选择项目> alt +输入> pydev-解释器/语法>解释器:默认)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.