VS 2015 Python Environments Greyed Out

血红的双手。 提交于 2019-12-06 09:43:35

问题


I'm just getting started with Python and I want to use Visual Studio 2015 Community Edition (VS) for writing my code. However, after diligently following the instructions on GitHub (1) Install PTVS 2.2.2 (2) Install Windows Python 3.4.4, VS cannot find the Python interpreter and run the code. When I attempt to do so for VS manually via Options > Python Tools > Environment Option, all the buttons are greyed out (I cannot enter information) as well as the Python Environment Window

I've tried uninstalling, reinstalling, repairing and modifying VS, PTVS and Python 3.4 but to no avail. Is there something I'm missing? Much appreciate the help!


回答1:


  1. Right-tap the lower-left corner and choose Run in the Quick Access Menu.
  2. Type regedit and tap OK in the Run dialog. Go to: KEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\PythonTools\Interpreters
  3. Delete or Rename folder in this directory (you can see that some keys are referring to the 3.6 version).
  4. Start Visual Studio 2015.



回答2:


It seems Visual Studio 2015 Community Edition does not like Python 3.6. If you just edit the registry:

KEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\PythonTools\Interpreters

as Luciano suggested, and replace the version key from 3.6 to 3.5 it works.



来源:https://stackoverflow.com/questions/40430831/vs-2015-python-environments-greyed-out

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!