当前位置: 首页 > 知识库问答 >
问题:

尝试在eclipse中配置python解释器时,在通过cygwin shell创建的virtualenv中使用python失败

仲霍英
2023-03-14

以下是日志中的错误,我试图配置解释器,但失败了。有人能帮忙解释一下这个错误吗?这是一台公司机器,所以我没有管理员权限。Cygwin安装了--no-admin选项,Eclipse是独立版。

环境详细信息:windows8cygwin:(最新)Eclipse:Version:Neon。2版本(4.6.2)构建id:20161208-0600 Python:Python 3.4。5(默认,2016年10月10日,14:41:48)[GCC 5.4.0]基于cygwin java版本“1.8.0_66”java(TM)SE运行时环境(构建1.8.0_66-b18)java热点(TM)64位服务器虚拟机(构建25.66-b18,混合模式)

日志摘录:

!ENTRY org.python.pydev.shared_core 4 4 2017-02-02 09:57:06.675
!MESSAGE No output was in the standard output when
trying to create the interpreter info for: D:\cygwin\bin\python3.4m.exe
The error output contains:>>Traceback (most recent call last):
File     "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 204, in <module>
prefix = tounicode(native_path(sys.prefix))
File     "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 68, in native_path
ctypes.cdll.cygwin1.cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, retval, MAX_PATH)
File "/usr/lib/python3.4/ctypes/__init__.py", line 421, in __getattr__
dll = self._dlltype(name)
File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: No such file or directory
<<
!STACK 0
java.lang.RuntimeException: No output was in the standard output when
trying to create the interpreter info for: D:\cygwin\bin\python3.4m.exe
The error output contains:>>Traceback (most recent call last):
File     "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 204, in <module>
prefix = tounicode(native_path(sys.prefix))
File     "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 68, in native_path
ctypes.cdll.cygwin1.cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, retval, MAX_PATH)
File "/usr/lib/python3.4/ctypes/__init__.py", line 421, in __getattr__
dll = self._dlltype(name)
File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: No such file or directory
<<
at     org.python.pydev.ui.interpreters.AbstractInterpreterManager.createInfoFromOutput(AbstractInterpreterManager.java:440)
at org.python.pydev.ui.interpreters.PythonInterpreterManager.doCreateInterpreterInfo(PythonInterpreterManager.java:71)
at org.python.pydev.ui.interpreters.PythonInterpreterManager.internalCreateInterpreterInfo(PythonInterpreterManager.java:44)
at org.python.pydev.ui.interpreters.AbstractInterpreterManager.createInterpreterInfo(AbstractInterpreterManager.java:390)
at org.python.pydev.ui.pythonpathconf.ObtainInterpreterInfoOperation.run(ObtainInterpreterInfoOperation.java:82)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

!ENTRY org.python.pydev.shared_core 4 4 2017-02-02 09:57:09.208
!MESSAGE java.lang.RuntimeException: No output was in the standard output when
trying to create the interpreter info for: D:\cygwin\bin\python3.4m.exe
The error output contains:>>Traceback (most recent call last):
File     "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 204, in <module>
prefix = tounicode(native_path(sys.prefix))
File "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 68, in native_path
ctypes.cdll.cygwin1.cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, retval, MAX_PATH)
File "/usr/lib/python3.4/ctypes/__init__.py", line 421, in __getattr__
dll = self._dlltype(name)
File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: No such file or directory
<<
!STACK 0
java.lang.Exception: java.lang.RuntimeException: No output was in the standard output when
trying to create the interpreter info for: D:\cygwin\bin\python3.4m.exe
The error output contains:>>Traceback (most recent call last):
File   "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 204, in <module>
prefix = tounicode(native_path(sys.prefix))
File  "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 68, in native_path
ctypes.cdll.cygwin1.cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, retval, MAX_PATH)
File "/usr/lib/python3.4/ctypes/__init__.py", line 421, in __getattr__
dll = self._dlltype(name)
File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: No such file or directory
<<
at         org.python.pydev.ui.pythonpathconf.InterpreterConfigHelpers.tryInterpreter(InterpreterConfigHelpers.java:123)
at org.python.pydev.ui.pythonpathconf.AbstractInterpreterEditor.getNewInputObject(AbstractInterpreterEditor.java:969)
at org.python.copiedfromeclipsesrc.PythonListEditor.addPressed(PythonListEditor.java:132)
at org.python.copiedfromeclipsesrc.PythonListEditor$1.widgetSelected(PythonListEditor.java:225)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:211)
at org.python.pydev.ui.PyProjectPythonDetails$ProjectInterpreterAndGrammarConfig$2.widgetSelected(PyProjectPythonDetails.java:244)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
at org.eclipse.swt.widgets.Widget.sendSelectionEvent(Widget.java:1120)
at org.eclipse.swt.widgets.Link.WM_LBUTTONUP(Link.java:1035)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4836)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3822)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: java.lang.RuntimeException: No output was in the standard output when
trying to create the interpreter info for: D:\cygwin\bin\python3.4m.exe
The error output contains:>>Traceback (most recent call last):
File     "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 204, in <module>
prefix = tounicode(native_path(sys.prefix))
File     "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 68, in native_path
ctypes.cdll.cygwin1.cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, retval, MAX_PATH)
File "/usr/lib/python3.4/ctypes/__init__.py", line 421, in __getattr__
dll = self._dlltype(name)
File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: No such file or directory
<<
at   org.python.pydev.ui.interpreters.AbstractInterpreterManager.createInfoFromOutput(AbstractInterpreterManager.java:440)
at org.python.pydev.ui.interpreters.PythonInterpreterManager.doCreateInterpreterInfo(PythonInterpreterManager.java:71)
at org.python.pydev.ui.interpreters.PythonInterpreterManager.internalCreateInterpreterInfo(PythonInterpreterManager.java:44)
at org.python.pydev.ui.interpreters.AbstractInterpreterManager.createInterpreterInfo(AbstractInterpreterManager.java:390)
at org.python.pydev.ui.pythonpathconf.ObtainInterpreterInfoOperation.run(ObtainInterpreterInfoOperation.java:82)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

!ENTRY org.python.pydev.shared_core 1 1 2017-02-02 09:57:09.239
!MESSAGE Information about process of adding new interpreter:
- Opening dialog to request executable (or jar).
- Chosen interpreter (name and file):'Tuple [D:\cygwin\bin\python3.4m.exe --      D:\cygwin\bin\python3.4m.exe]
- Ok, file is non-null. Getting info on:D:\cygwin\bin\python3.4m.exe
- Beggining task:Getting libs totalWork:100
- Setting task name:Mounting executable string...
- Setting task name:Executing:  D:\cygwin\bin\python3.4m.exe -u     D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py
- Setting task name:Making pythonpath environment...  D:\cygwin\bin\python3.4m.exe -u  D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py
- Setting task name:Making exec... D:\cygwin\bin\python3.4m.exe -u  D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterIn fo.py
- Setting task name:Reading output...
- Setting task name:Waiting for process to finish.
Exception detected: No output was in the standard output when
trying to create the interpreter info for: D:\cygwin\bin\python3.4m.exe
The error output contains:>>Traceback (most recent call last):
File  "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 204, in <module>
prefix = tounicode(native_path(sys.prefix))
File  "D:\david\eclipse\plugins\org.python.pydev_5.5.0.201701191708\pysrc\interpreterInfo.py", line 68, in native_path
ctypes.cdll.cygwin1.cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, retval, MAX_PATH)
File "/usr/lib/python3.4/ctypes/__init__.py", line 421, in __getattr__
dll = self._dlltype(name)
File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: No such file or directory
<<

共有1个答案

归星驰
2023-03-14

尝试执行Python安装中的测试Python命令,例如“Python--version”,以查看Python是否执行良好。就我而言,一个windows库丢失了。

 类似资料:
  • 问题内容: 我很难用Python创建virtualenv并激活它。我正在使用 Windows 操作系统。 在命令提示符下, 我通过键入以下命令安装了virtualenv: 然后,要在其中创建虚拟环境,我使用了以下方法: 但是,我不确定是否正确。 接下来,我无法理解如何激活它。对于Linux,我发现可以使用 / bin / activate源 完成 激活 。但是,找不到适用于Windows的操作系统

  • 问题内容: 使用virtualenv,我使用默认版本的Python(2.7)运行项目。在一个项目中,我需要使用Python 3.4。 我曾经将其安装在Mac上。现在,如何创建使用新版本的virtualenv? 例如sudo virtualenv envPython3 如果我尝试: 我得到: 问题答案: 只需运行 OP编辑后更新: 有没有在OP的版本virtualenv中的一个bug,如所描述这里。

  • 我使用在我的Mac上安装它。现在,我如何创建一个使用新版本的virtualenv? 例如sudo virtualenv envPython3 如果我试着:

  • 问题内容: 我想创建一种秒表,当分钟数达到20分钟时,会弹出一个对话框,该对话框不是问题。但是我的分钟变量在此代码中没有增加。 问题答案: 您可以使用以下方法真正简化整个程序:

  • 问题内容: 我使用vim进行编码,尤其是python编码。通常,我想使用python解释器执行当前缓冲区。(例如运行unittests),通常我使用 此场景将与全局python一起正常工作,但我想改为运行virtualenv python。如何在vim中启用virtualenv?是否可以在运行时切换virtualenv? 我正在使用macvim 问题答案: 这是我使用的(很抱歉,突出显示的内容很奇

  • 问题内容: 我打算为Python安装一个虚拟环境,以使我的Python包分开。这样做的动机之一也是在我的机器上同时存在两个版本的Python(Ubuntu 14.04)。我有以下奇观: 应该以什么顺序安装Python,PIP和virtualenv?有关系吗? 完成后,如何在virtualenv下将两个python版本分开? 假设我正在处理单独的项目,是否建议将每个项目都保存在virtualenv创