6 ms·
Interesting stats regarding version 2/3 usage from a moderator of /r/python today: Here's the breakdown by which Pythons were used to download from PyPI in the
by 21 11y ago
Interesting stats regarding version 2/3 usage from a moderator of /r/python today:
Here's the breakdown by which Pythons were used to download from PyPI in the last two weeks:
2.7 85.90%
2.6 6.66%
3.4 4.64%
3.5 2.09%
3.3 0.56%
3.2 0.12%
(Two weeks was ~133 million downloads)
https://www.reddit.com/r/Python/comments/45sm94/what_are_the_most_recent_python_3_vs_python_2/czzy5wa https://www.reddit.com/r/Python/comments/45sm94/what_are_the...
- jsmeaton 11y agoBe aware that PyPI isn't a great way to get accurate statistics. One of the reasons is when tox tests via a matrix, Python 2.7 is usually the first python listed, and if it fails then Python > 3 will not be tested. Also, it'll reuse libraries from the pip download cache. I don't doubt that python 2.7 accounts for the majority of the downloads, but I sincerely doubt 2.7 usage is at ~85%. 2.6 usage is probably almost exclusively RHEL/CentOS 5/6 system pythons and not representative of actual projects.
- viraptor 11y agoAlso it's important to remember that system-wide packages get installed once, while pypi stuff will get redownloaded a lot. It means that for example users of recent arch, ubuntu and other distros which install python3 by default are more likely to have some of the dependencies already there, while anyone installing just python2 base package will download deps from pypi. Also pip itself got upgraded to use caching by default not that long ago. All distributions defaulting to python2 will still have old pip which redownloads your packages on every installation (`tox -r` for example). More recent distros will give you tox which caches the downloads locally (which lowers the numbers). Pypi also doesn't count private repos. If openstack started testing commits using pypi repository and turned off caching, I'm guessing it would add at least 10% to python 3.4. TL;DR: pypi stats are interesting, but don't rely on them to give you precise answer.
- voltagex_ 11y agoDebian Popcon is interesting too, but don't rely on it either: https://qa.debian.org/popcon-graph.php?packages=python3.4%2C+python2.7&show_installed=on&want_legend=on&want_ticks=on&from_date=&to_date=&hlght_date=&date_fmt=%25Y-%25m&beenhere=1 https://qa.debian.org/popcon-graph.php?packages=python3.4%2C...
- shadowmint 11y agoBe aware that PyPI isn't a great way to get accurate statistics. You can't just ignore a bunch of statistics because they aren't convenient to you; that's not how maths works. Statistical sampling is based on the premise that your sample is randomized from the total population; I would argue that the stats from pypi represent a reasonable random sample of python users around the world. Certainly, you can argue otherwise... if you care to provide some meaningful alternative statistics?
- scrollaway 11y agoGP has argued otherwise. PyPI sampling is not random. It is heavily influenced by automatic downloads and such and completely ignores that most simple 2.x libs / non-3.3-tagged libs will work just fine on python 3. In other words, it is neither random nor representative of python 3 usage, failing the premise you yourself mentioned. There's no easy way to determine Python 3 usage overall. Your best bet is to go around polling companies of all sizes as well as indie devs. What you will find is that: 1. Some amount of people still use Python 2.x because they don't know any better 2. Some amount of people want to use 3.x, but still use Python 2.x because of incompatible dependencies. 3. Some amount of people (companies mostly) still use Python 2.x because a migration to 3.x is currently too costly. 1 -> This is partly caused by FUD. Hating on Python 3 has become a popular past time of people who don't know how to be productive otherwise. It's also caused by the very high amount of tutorials etc around the web that "require" 2.x because, for example, they have an unparenthesized print call (relevant XKCD: 353). Arguably this is one of the big failures of the 3.x push. 2 -> That number is constantly diminishing as more dependencies become available on 3.x. The most recent big win is Scrapy, a massively popular scraping framework, which just finished its 3.x port a couple weeks ago. It's an ongoing process - we are in a much better state than we used to be, the Py3WOS is looking almost entirely green. 3 -> This number is mostly irrelevant as it tends to be in closed ecosystems. So maybe CloudShareBuzzr Inc. is using Python 2.7 internally, but they don't produce anything open source so it doesn't affect the rest of the ecosystem. As new, major features are constantly added to Python 3.x (venv in 3.3, pip in 3.4, async def in 3.5), eventually the cost of switching will be worth it.
- 11y ago
- analog31 11y agoI wonder how many users actually download packages, as opposed to something like Anaconda or WinPython. It may be that the users of Python 2 may be more likely to download individual packages because they are creating more specialized installations (e.g., web services etc.) whereas the educational and scientific crowd just get a big distribution like Anaconda or WinPython. For instance I use WinPython for convenience, and typically use Python 3.
- Gratsby 11y agoTo be fair, Python 2.x is installed everywhere and python 3.x wasn't really usable in production until 3.3. And there's barriers to migration like Twisted has. It's been a lot of years, but people are slowly and finally starting to migrate to 3. It could be worse. I'm still waiting for perl6 because those guys got caught up in Haskell hell.
- awwaiid 11y agoEr... wait no longer! Grab rakudobrew and perl6 some stuff :)
- benatkin 11y agoI'm disinclined to use it, partly because it shows a community that's slow to evolve, but mostly because the Python project decided that 2.7 was the last 2.x.
- mkesper 11y agoYou're contradicting yourself.