I have installed Win10, Visual Studio 2015, Python 2.7, Python 3.5 and PTVS 2.2.3.
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.
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.
In Tools > Options > Python Tools, the only text shown is: "An error occurred loading this property page".
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.
To solve this, I would like to know how to make the Python Environment window appearing in Visual Studio.
Thanks for any help.
解决方案VS keeps a cache of loaded assemblies that doesn't always get
invalidated when it should.
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