Skip to content

Instantly share code, notes, and snippets.

@dstufft
Last active January 3, 2016 11:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstufft/8455306 to your computer and use it in GitHub Desktop.
Save dstufft/8455306 to your computer and use it in GitHub Desktop.

These numbers are based on the downloads from PyPI from 2014-01-02 through 2014-01-15. It only includes people using pip 1.4 or greater as no other installer provides the kind of granularity in it's user agent to process these numbers.

Downloads by Python Language Major Version

SELECT array_to_string(python_version[0:1], '.') AS python_version, COUNT(*)
FROM (
    SELECT string_to_array(python_version, '.') AS python_version
    FROM downloads
    WHERE installer_type = 'pip' AND installer_version != ''
) AS d
GROUP BY array_to_string(python_version[0:1], '.')
ORDER BY COUNT(*) DESC;

 python_version |  count
----------------+---------
 2              | 8114543
 3              |  304565
                |   10755

Downloads by Python Language Series

SELECT array_to_string(python_version[0:2], '.') AS python_version, COUNT(*)
FROM (
    SELECT string_to_array(python_version, '.') AS python_version
    FROM downloads
    WHERE installer_type = 'pip' AND installer_version != ''
) AS d
GROUP BY array_to_string(python_version[0:2], '.')
ORDER BY COUNT(*) DESC;

 python_version |  count
----------------+---------
 2.7            | 6447970
 2.6            | 1666573
 3.3            |  250051
 3.2            |   51540
                |   10755
 3.4            |    2955
 3.1            |      19

Downloads by Python Series

SELECT python_type, array_to_string(python_release[0:2], '.') AS python_release, COUNT(*)
FROM (
    SELECT
        python_type,
        string_to_array(
            (
                CASE WHEN (python_release IS NULL OR python_release = '')
                THEN python_version ELSE python_release END
            ),
            '.'
        ) AS python_release
    FROM downloads
    WHERE installer_type = 'pip' AND installer_version != ''
) AS d
GROUP BY python_type, array_to_string(python_release[0:2], '.')
ORDER BY COUNT(*) DESC;

 python_type | python_release  |  count
-------------+-----------------+---------
 cpython     | 2.7             | 6402435
 cpython     | 2.6             | 1666573
 cpython     | 3.3             |  250051
 cpython     | 3.2             |   51540
 pypy        | 2.2             |   38246
 pypy        | 2.0             |    8768
 pypy        | 2.1             |    7561
 cpython     | 3.4             |    2955
 pypy        | 1.9             |    1198
 pypy        | 1.8             |     345
 pypy        | 2.3             |     160
 cpython     | 3.1             |      19
 pypy        | 1.6             |      12

Downloads by Python Version

SELECT python_type, python_release, COUNT(*)
FROM (
    SELECT
        python_type,
        (
            CASE WHEN (python_release IS NULL OR python_release = '')
            THEN python_version ELSE python_release END
        )
    FROM downloads
    WHERE installer_type = 'pip' AND installer_version != ''
) AS d
GROUP BY python_type, python_release
ORDER BY COUNT(*) DESC;

 python_type | python_release |  count
-------------+----------------+---------
 cpython     | 2.7.3          | 4111374
 cpython     | 2.6.6          | 1202375
 cpython     | 2.7.5          |  874677
 cpython     | 2.7.5+         |  506119
 cpython     | 2.7.6          |  418305
 cpython     | 2.6.9          |  269420
 cpython     | 2.7.4          |  215049
 cpython     | 3.3.3          |  190901
 cpython     | 2.7.1+         |  103015
 cpython     | 2.6.5          |   97634
 cpython     | 2.7.2          |   95732
 cpython     | 2.6.8          |   75965
 cpython     | 3.2.3          |   47111
 cpython     | 2.7.0          |   47043
 pypy        | 2.2.1          |   35647
 cpython     | 3.3.2          |   34800
 cpython     | 2.7.1          |   21823
 cpython     | 3.3.2+         |   15377
 cpython     | 2.6.7          |   14103
 pypy        | 2.0.2          |    8721
 cpython     | 2.7.2+         |    7290
 pypy        | 2.1.0          |    7289
 cpython     | 2.6.0          |    5057
 cpython     | 3.3.0          |    4301
 cpython     | 3.3.1          |    4280
 cpython     | 3.2.5          |    3220
 pypy        | 2.2.0          |    2599
 cpython     | 3.4.0b2        |    1518
 pypy        | 1.9.0          |    1198
 cpython     | 2.6.1          |    1106
 cpython     | 2.7.6rc1       |     879
 cpython     | 3.4.0b1        |     788
 cpython     | 2.7.6+         |     753
 cpython     | 3.4.0b2+       |     602
 cpython     | 3.2.4          |     577
 cpython     | 2.6.4          |     547
 cpython     | 3.2.2          |     383
 pypy        | 1.8.0          |     345
 cpython     | 2.6.2          |     325
 pypy        | 2.1.0beta      |     259
 cpython     | 2.7.3rc2       |     242
 cpython     | 3.2.0          |     196
 cpython     | 3.3.3rc1       |     182
 pypy        | 2.3.0alpha     |     160
 cpython     | 2.7.0+         |     121
 cpython     | 3.3.3+         |     112
 cpython     | 3.3.3rc2       |      70
 cpython     | 3.2.1          |      53
 pypy        | 2.0.0beta      |      46
 cpython     | 2.6.3          |      28
 cpython     | 3.3.0+         |      25
 cpython     | 3.4.0a3        |      23
 cpython     | 3.4.0a4        |      16
 pypy        | 2.1.0alpha     |      13
 pypy        | 1.6.0          |      12
 cpython     | 2.7.3rc1       |      11
 cpython     | 2.6.9rc1       |      11
 cpython     | 3.1.3          |      10
 cpython     | 3.1.2          |       7
 cpython     | 3.4.0a2        |       5
 cpython     | 3.3.0b2        |       3
 cpython     | 3.1.5          |       2
 cpython     | 2.6.2c1        |       2
 cpython     | 2.7.2rc1       |       2
 cpython     | 3.4.0a1        |       2
 pypy        | 2.0.0          |       1
 cpython     | 3.4.0a4+       |       1

Downloads by Operating System

SELECT operating_system, COUNT(*)
FROM downloads
WHERE installer_type = 'pip' AND installer_version != ''
GROUP BY operating_system
ORDER BY COUNT(*) DESC;

  operating_system   |  count
---------------------+---------
 Linux               | 7547844
 Darwin              |  632976
 Windows             |  230964
 FreeBSD             |   11605
 SunOS               |    1859
 CYGWIN_NT-6.1-WOW64 |    1677
 CYGWIN_NT-6.1       |    1275
 CYGWIN_NT-5.1       |     395
 CYGWIN_NT-6.3-WOW64 |     273
 CYGWIN_NT-6.3       |     227
 NetBSD              |     203
 CYGWIN_NT-6.2-WOW64 |     187
 CYGWIN_NT-6.2       |     129
 OpenBSD             |      75
 CYGWIN_NT-6.0       |      47
 AIX                 |      43
 DragonFly           |      27
 QNX                 |      24
 CYGWIN_NT-6.0-WOW64 |      20
 Unknown             |      10
 CYGWIN_NT-5.2       |       2
 GNU                 |       1

Downloads by Python Series and OS

SELECT python_type, array_to_string(python_release[0:2], '.') AS python_release, operating_system, COUNT(*)
FROM (
    SELECT
        python_type,
        string_to_array(
            (
                CASE WHEN (python_release IS NULL OR python_release = '')
                THEN python_version ELSE python_release END
            ),
            '.'
        ) AS python_release,
        operating_system
    FROM downloads
    WHERE installer_type = 'pip' AND installer_version != ''
) AS d
GROUP BY python_type, array_to_string(python_release[0:2], '.'), operating_system
ORDER BY COUNT(*) DESC;

 python_type | python_release |  operating_system   |  count
-------------+----------------+---------------------+---------
 cpython     | 2.7            | Linux               | 5609347
 cpython     | 2.6            | Linux               | 1643722
 cpython     | 2.7            | Darwin              |  582740
 cpython     | 2.7            | Windows             |  194488
 cpython     | 3.3            | Linux               |  192603
 cpython     | 3.2            | Linux               |   48123
 pypy        | 2.2            | Linux               |   35445
 cpython     | 3.3            | Windows             |   30409
 cpython     | 3.3            | Darwin              |   25514
 cpython     | 2.6            | Darwin              |   18475
 cpython     | 2.7            | FreeBSD             |   10914
 pypy        | 2.0            | Linux               |    8672
 pypy        | 2.1            | Linux               |    7233
 cpython     | 2.6            | Windows             |    3834
 pypy        | 2.2            | Darwin              |    2599
 cpython     | 3.2            | Darwin              |    2098
 cpython     | 2.7            | CYGWIN_NT-6.1-WOW64 |    1538
 cpython     | 2.7            | CYGWIN_NT-6.1       |    1242
 cpython     | 3.2            | Windows             |    1183
 cpython     | 3.4            | Linux               |    1169
 pypy        | 1.9            | Linux               |    1063
 cpython     | 3.4            | Darwin              |    1019
 cpython     | 3.3            | SunOS               |     995
 cpython     | 3.4            | Windows             |     767
 cpython     | 2.7            | SunOS               |     612
 cpython     | 3.3            | FreeBSD             |     496
 cpython     | 2.7            | CYGWIN_NT-5.1       |     376
 pypy        | 1.8            | Linux               |     343
 pypy        | 2.1            | Darwin              |     286
 cpython     | 2.7            | CYGWIN_NT-6.3-WOW64 |     267
 cpython     | 2.6            | SunOS               |     249
 cpython     | 2.7            | CYGWIN_NT-6.3       |     207
 cpython     | 2.7            | NetBSD              |     203
 pypy        | 2.2            | Windows             |     186
 cpython     | 2.7            | CYGWIN_NT-6.2-WOW64 |     179
 cpython     | 2.6            | FreeBSD             |     168
 pypy        | 1.9            | Darwin              |     134
 cpython     | 2.7            | CYGWIN_NT-6.2       |     109
 pypy        | 2.3            | Linux               |     105
 cpython     | 2.6            | CYGWIN_NT-6.1-WOW64 |      99
 pypy        | 2.0            | Darwin              |      94
 pypy        | 2.3            | Windows             |      46
 cpython     | 2.7            | CYGWIN_NT-6.0       |      45
 cpython     | 2.7            | AIX                 |      43
 pypy        | 2.1            | Windows             |      42
 cpython     | 2.7            | OpenBSD             |      41
 cpython     | 3.2            | CYGWIN_NT-6.1-WOW64 |      40
 cpython     | 3.3            | OpenBSD             |      34
 cpython     | 3.2            | CYGWIN_NT-6.1       |      28
 cpython     | 2.7            | DragonFly           |      27
 cpython     | 2.7            | QNX                 |      24
 cpython     | 3.2            | CYGWIN_NT-6.3       |      20
 cpython     | 3.2            | CYGWIN_NT-6.2       |      20
 cpython     | 2.7            | CYGWIN_NT-6.0-WOW64 |      20
 cpython     | 3.1            | Linux               |      19
 cpython     | 2.6            | CYGWIN_NT-5.1       |      18
 pypy        | 2.2            | FreeBSD             |      16
 cpython     | 3.2            | FreeBSD             |      11
 cpython     | 2.7            | Unknown             |      10
 pypy        | 2.3            | Darwin              |       9
 cpython     | 3.2            | CYGWIN_NT-6.3-WOW64 |       6
 pypy        | 1.6            | Darwin              |       6
 pypy        | 1.6            | Windows             |       6
 cpython     | 2.6            | CYGWIN_NT-6.1       |       5
 cpython     | 3.2            | CYGWIN_NT-6.2-WOW64 |       5
 cpython     | 2.6            | CYGWIN_NT-6.2-WOW64 |       3
 cpython     | 3.2            | SunOS               |       3
 pypy        | 2.0            | Windows             |       2
 cpython     | 2.7            | CYGWIN_NT-5.2       |       2
 cpython     | 3.2            | CYGWIN_NT-6.0       |       2
 pypy        | 1.8            | Darwin              |       2
 cpython     | 3.2            | CYGWIN_NT-5.1       |       1
 pypy        | 1.9            | Windows             |       1
 cpython     | 2.7            | GNU                 |       1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment