0

Python Tools for Visual Studio has recognised my Python 3.5 (Anaconda) environment, but then I upgraded the environment (using conda I think) to Python 3.6 and now the environment name doesn't match the Python version. See where I do print(sys.version) in the interactive window:

Python environment name version mismatch

Is there any way to fix/update/refresh the name of the environment?

Update

It seems that this is an 'automatically detected' environment, and there is no option to configure automatically detected environments:

No configure option

I see that the release notes for PTVS 2.2.6 explicitly states that they do not yet support Python 3.6 so perhaps this explains the issue.

Fixes errors when auto-configuring Python 3.6 (issues #1565, #1994 and #2005) Note that Python 3.6 is still not supported by this release. This fix merely prevents a crash when unsupported versions are configured as custom environments.

https://github.com/Microsoft/PTVS/releases/tag/v2.2.6

Tom Hunter
  • 5,714
  • 10
  • 51
  • 76

1 Answers1

0

There is option to remove/add python environment in config tab. I guess you can select and edit some info there. You can also remove one environment from the list and add it back later (and update its name).

(Edit 1)

Open Python Environment window by: Tools> Python tools> Python Environments, You'll see list of available python environments on it, select the one you need. Just below the environment list, there is a dropdown list (with text 'Overview' on it), click on it to expand, then click 'Configure'. All the details of that environment is there to review and edit. You can change the description then click 'Apply'. That's what you need.

swatchai
  • 17,400
  • 3
  • 39
  • 58
  • Please could you clarify where I can find the "config tab"? – Tom Hunter Feb 11 '17 at 16:31
  • @TomHunter some instruction has been added in the answer. – swatchai Feb 11 '17 at 17:32
  • Hi @swatchai, thanks for the tip. Unfortunately it seems that it's not possible to configure 'automatically' detected environments. Furthermore it seems that PTVS 2.2.6 doesn't yet support Python 3.6 which I think explains the issue I'm having. – Tom Hunter Feb 12 '17 at 11:05