Skip to content
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

VS incorrectly identifies Python 3.7 as 2.5 or earlier, prevents debugging #4842

Closed
cowlinator opened this issue Nov 6, 2018 · 8 comments
Closed

Comments

@cowlinator
Copy link

cowlinator commented Nov 6, 2018

In VS, when selecting Python 3.7 or a 3.7 virtual environment as my python environment, I cannot debug my python scripts. I get the error message "Debugging is not supported for Python 2.5 and earlier".

I do not (and never had) python 2.5 or earlier installed on this machine.

I have installed both python 2.7 (first) and python 3.7 (later). I believe I installed 3.7 after PTVS.

@cowlinator cowlinator changed the title VS incorrectly identifies Python 3.7 as 2.5, prevents debugging VS incorrectly identifies Python 3.7 as 2.5 or earlier, prevents debugging Nov 6, 2018
@cowlinator
Copy link
Author

I just noticed that the "Properties" panel for Python 3.7 shows "Version 0.0" for Python 3.7. I'm sure it's probably related.

@huguesv
Copy link
Contributor

huguesv commented Nov 6, 2018

Could you please check the version of VS in the About Box? If you're not on 15.8.x, then it's possible the that Python 3.7 support wasn't all in yet.

A workaround for incorrectly detected environments is to add them as custom environments. You can set the language to 3.6 for a close enough approximation.

@cowlinator
Copy link
Author

cowlinator commented Nov 7, 2018

Didn't try a custom environment, but my VS version was VS 15.2, and after upgrading to 15.8.9, the error disappeared. Thanks!

It makes sense that the user is required to use the latest VS version, but that error message is very misleading.

@KonssnoK
Copy link

KonssnoK commented Jun 4, 2020

the same is happening for python 3.8 in VS 15.9.23

Switching the project to python 3.6 solved the issue.

@deepika45
Copy link

@KonssnoK , does switching to python 3.6 needs me to install python 3.6 on top of python 3.8?

@KonssnoK
Copy link

KonssnoK commented Jun 4, 2020

@deepika45 i had it already available,
I guess it's the Standard visual studio installation (looking at paths)
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\

Python 3.8 was the one installed over 3.6 in my case :)
C:\Programs\Python38-32

@deepika45
Copy link

@deepika45 i had it already available,
I guess it's the Standard visual studio installation (looking at paths)
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\

Python 3.8 was the one installed over 3.6 in my case :)
C:\Programs\Python38-32

Worked for me. Thnx!

@aw2003
Copy link

aw2003 commented Aug 27, 2020

Still seen in VS2017 15.9.24 / Python 3.8.1. VS environment for Python 3.8 won't work, have to create custom and label it as 3.6 while pointing to 3.8 binaries. can you fix this??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants