3 ms·
I spent some time with Python just this morning and was curious. Starting out.. should I use Python 3 or 2.x because most packages / modules are written for 2?
by mattkrea 13y ago
I spent some time with Python just this morning and was curious. Starting out.. should I use Python 3 or 2.x because most packages / modules are written for 2?
- csense 13y ago> most packages / modules are written for 2 This is actually not so much the case any more; many packages now support Python 3, and Python 2.7 is nearing end-of-life. However, many of the tutorials you will read have probably not updated their statements about Python 2/3 compatibility. Python 2.x was indeed far better as far as library compatibility for quite some time after the (IMHO idiotic) decision not to use the proven Python way to introduce new features (from __future__ import), and instead have the 3.x release break backwards compatibility entirely. My advice is to start with Python 3, then switch to Python 2 if you discover your project requires a specific library that does not yet support Python 3.
- jaegerpicker 13y agoPython is a fantastic eco system and it can be used for a HUGE variety of tasks with really great results. Certain problem domains are better tackled from 3 and some from 2.7. Web development (my day job is writing python for a series of django webapps) is a great experience with either. I think scientific and data science based environments have better lib support in 2.7.