Visual Studio Python环境窗口不显示

Visual Studio Python环境窗口不显示

问题描述:

我已经安装了Win10,Visual Studio 2015,Python 2.7,Python 3.5和PTVS 2.2.3.

I have installed Win10, Visual Studio 2015, Python 2.7, Python 3.5 and PTVS 2.2.3.

不幸的是,PTVS根本无法工作.我无法加载以前在Visual Studio中加载的任何Python项目.在安装Python 3.5之前,它已经奏效.我尝试卸载Python 2.7并收到错误消息,提示卸载未成功.经过几次尝试,问题似乎出在pip上,这在某种程度上阻止了Python 2.7的安装和卸载.

Unfortunately PTVS does not work at all. I can not load any Python projects that were loading previously in Visual Studio. It worked before I installed Python 3.5. I tried to uninstall Python 2.7 and get an error saying that the uninstall didn't success. After several tries, the problem appears to be around pip which is somehow blocking both install and uninstall of Python 2.7.

尝试从工具"菜单打开"Python工具"时,没有任何反应.既不打开窗口也不显示任何错误消息.即使使用快捷方式,"Python环境"窗口也不会打开.

When trying to open Python Tools from Tools menu, nothing happens. Neither window opens nor any error message is displayed. Python Environments window does not open even with the shortcut.

在工具">选项">"Python工具"中,唯一显示的文本是:加载此属性页面时发生错误".

In Tools > Options > Python Tools, the only text shown is: "An error occurred loading this property page".

当我尝试加载/重新加载Python项目时,消息为:错误:预期1份合同名称为" Microsoft.PythonTools.Interpreter.IInterpreterOptionsService的导出,但在应用适用的约束后发现0.这已经发布了11天,但没有人回答.

When I try to load/reload the Python project, the message is: "error : Expected 1 export(s) with contract name "Microsoft.PythonTools.Interpreter.IInterpreterOptionsService" but found 0 after applying applicable constraints." This has already been posted for 11 days ago, but no one has answered.

为解决此问题,我想知道如何使Python Environment窗口出现在Visual Studio中.

To solve this, I would like to know how to make the Python Environment window appearing in Visual Studio.

感谢您的帮助.

VS保留已加载的程序集的缓存,该缓存并不总是得到 应该失效.

VS keeps a cache of loaded assemblies that doesn't always get invalidated when it should.

如果删除 C:\ Users \ You \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0 \ ComponentModelCache 然后重新启动就可以了. src: https://github.com/Microsoft/PTVS/issues/1388

If you delete C:\Users\You\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache and restart you should be fine. src: https://github.com/Microsoft/PTVS/issues/1388