Skip to content

It detected a wrong version of Python #2219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
reaCodes opened this issue Jul 21, 2018 · 7 comments
Closed

It detected a wrong version of Python #2219

reaCodes opened this issue Jul 21, 2018 · 7 comments
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@reaCodes
Copy link

Environment data

  • VS Code version: 1.25.1
  • Extension version (available under the Extensions sidebar): 2018.6.0
  • OS and version: Windows 10 1830
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: XXX

Actual behavior

I have upgraded Python 3.6.5 to 3.7.0. Why is this still 3.6?
image

@DonJayamanne
Copy link

Have you selected the python environment?
If not please select it.
The status bar shows the default python version.
Here's the documentation https://code.visualstudio.com/docs/python/environments#_select-an-environment

@reaCodes
Copy link
Author

image
It can only choose Python 3.6

@DonJayamanne
Copy link

DonJayamanne commented Jul 22, 2018

This would indicate the fact that 3.7 is not in a standard discoverable directory.

  • Please could you print the location of python 3.7 install directory.
  • Also print the output of python --version for the 3.7 environment

@reaCodes
Copy link
Author

reaCodes commented Jul 22, 2018

@DonJayamanne
image

image

@DonJayamanne DonJayamanne reopened this Jul 22, 2018
@DonJayamanne
Copy link

Please try ring the following from command prompt and provide the output of each:

  • C:/Program Files/Python/python.exe --version
  • Python --version
  • Python -c "import sys;print(sys.executable)"

@reaCodes
Copy link
Author

@DonJayamanne
image

@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug needs verification labels Jul 23, 2018
@DonJayamanne
Copy link

DonJayamanne commented Jul 30, 2018

Looks like something is wrong with the registry entries.
Please could you dump the registry entries for the following path:
* HKEY_LOCAL_MACHINE\SOFTAWARE\Python
* HKEY_CURRENT_USER\SOFTAWARE\Python

Never mind, I'm able to replicate this. The problem is with the registry entries. They do not get updated, i.e. bug in Python installer.

This issue should get resolved with #1351, as we'll not be using the registry entries in display names.

Steps to reproduce:

  • Install python 3.6 in directory x
  • Install python 3.7 in the same directory x
  • Two separate registry entries exist for python 3.6 and 3.7 (though 3.6 doesn't exist anymore, as it has been overwritten)

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed needs verification labels Jul 30, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants