Despite Python 2 nearing end-of-life on January 1, 2020, 10% of Python developers were still using it in 2019, according to JetBrains’ 2019 Python developer survey.  

The share of developers still using Python 2 has been decreasing year-over-year. JetBrains’ 2017 survey found that 25% were using Python 2 and their 2018 found that 16% were still using it. While this report contains data from 2019 and Python 2 reached end of life in 2020, an ActiveState survey from earlier this year revealed that 50% of companies didn’t have a plan in place for Python 2’s end of life. 

The most common use for Python 2 was web development, while the most common use for Python 3 is data analysis. “Although Data analysis is more popular among Python developers, it is interesting to see that its share among those who use Python 2 is lower than web development’s share. This is probably because data analysis in Python has grown more popular in recent years, while web development is a more mature field and some web developers have lots of legacy code to maintain,” JetBrains wrote in the report.

RELATED CONTENT: Moving from Python 2 to Python 3

The most common use for Python in general isn’t surprising. Fifty-nine percent of respondents said they use Python for data analysis. This was followed by 51% using it for web development, 40% using it for machine learning, and 39% using it for DevOps, system administration, and writing automation scripts. 

Python developers don’t tend to only use Python for one purpose. The respondents were asked “What do you use Python for?” and the mean number of purposes was 3.9. 

Eighty-four percent of the respondents said that Python was their main language. The most common secondary languages were JavaScript (43%), Bash / Shell (40%), HTML/CSS (40%), SQL (37%), C/C++ (28%), and Java (19%). 

The report also looked into the most popular Python frameworks and libraries. Flask and Django were the most popular web frameworks by far, with 48% and 44% of developers using them. The next closest was Tornado at 5%. There was a more even distribution of popularity for data science frameworks and libraries. NumPy was the most popular, with 64% of Python developers using it. This was followed by Pandas (55%), Matplotlib (46%), SciPy (36%), SciKit-Learn (33%), TensorFlow (26%), and Keras (20%). All other data science libraries and frameworks had less than 20% use. 

JetBrains gathered information from 24,000 Python developers from more than 150 countries for the survey.