Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I know whether to use Python 2 or Python 3?

Tags:

python

As we all know, usually Python projects exclusively run on the Python version (2 or 3) that they were made for.

However, when I come across Python projects, for example this one on GitHub, they almost never state the necessary Python version.

How do you know which Python you need to run the project?

like image 864
AndreKR Avatar asked Mar 12 '26 12:03

AndreKR


1 Answers

Python doesn't support a means to determine this automatically.

You (the author of a python project) can make your python application friendly, as discussed here.

However, if the author didn't do that (and most don't) then you can only try and hope for the best, AFAIK.

like image 88
GreenAsJade Avatar answered Mar 15 '26 01:03

GreenAsJade