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

时间:2017-02-02 15:40:28

标签: python eclipse cygwin virtualenv python-3.4

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

环境详情: Windows 8 Cygwin :(最新的) Eclipse:版本:Neon.2发行版(4.6.2)内部版本号: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 HotSpot(TM)64位服务器VM(版本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 个答案:

答案 0 :(得分:0)

尝试执行测试Python命令,例如&#34; python --version&#34;从Python安装看到Python执行得很好。就我而言,缺少一个Windows库。