Python 2 series and 3 series (Anaconda edition)

Package differences depending on Python version

Python 3.5 has been released [^ 1]. It seems that Anaconda [^ 2] is also supported. I usually use Anaconda, so let's check how the package has changed on Anaconda. First, let's get the data from the Anaconda site and make it a pandas table.

python


import pandas as pd
from urllib import request
from bs4 import BeautifulSoup
with request.urlopen('http://docs.continuum.io/anaconda/pkg-docs') as fp:
    s = fp.readall()
bs = BeautifulSoup(s)
ls = bs.findAll('table', attrs={'class':'docutils'})
vers = [2.7, 3.4, 3.5]
res = []
for i in range(len(vers)):
    rows = ls[i].findAll('tr')
    for r in rows[1:]:
        t = r.findAll('td')
        res.append((vers[i], t[0].find('a').text, len(t[3].contents) > 0))
a = pd.DataFrame(res, columns=['ver', 'nam', 'ini'])

Let's look at the number of packages included.

python


print('Number of supported packages:', a.groupby('ver').size())
>>>
Number of supported packages: ver
2.7    387
3.4    323
3.5    317
dtype: int64

Let's see the number of initial installations. 3.4 seems to be out of scope.

python


print('In intaller:', a[a.ini].groupby('ver').size())
>>>
In intaller: ver
2.7    168
3.5    153
dtype: int64

Set it to set once.

python


a27, a34, a35 = a.groupby('ver').nam
a27, a34, a35 = set(a27[1]), set(a34[1]), set(a35[1])

Things that are in Python 3 series but not in 2 series.

python


print('Only 3.X', (a34|a35) - a27)
>>>
Only 3.X {'blosc', 'xz'}

There seems to be no one with only Python 3.4.

python


print('Only 3.4', a34 - (a27|a35))
>>>
Only 3.4 set()

There seems to be nothing that has increased in Python 3.5.

python


print('In 3.5 but 3.4', a35 - a34)
>>>
In 3.5 but 3.4 set()

A package scraped with Python 3.5.

python


print('Disappeared at 3.5', a34 - a35)
>>>
Disappeared at 3.5 {'yt', 'azure', 'bottleneck', 'llvmlite', 'numba', 'blaze'}

Something that is in Python2.7 but not in Python3.X. However, it seems that some of them can be installed with pip.

python


print('Only 2.7', a27 - (a34|a35))
>>>
Only 2.7 {'starcluster', 'python-gdbm', 'mtq', 'traitsui', 'scrapy', 'graphite-web', 'casuarius', 'gensim', 'progressbar', 'ssh', 'grin', 'singledispatch', 'cheetah', 'llvm', 'protobuf', 'websocket', 'gdbm', 'faulthandler', 'gevent-websocket', 'dnspython', 'envisage', 'pyamg', 'py2cairo', 'pixman', 'hyde', 'vtk', 'python-ntlm', 'cdecimal', 'db', 'chaco', 'chalmers', 'mysql-python', 'paste', 'pep381client', 'mercurial', 'mesa', 'fabric', 'googlecl', 'ipaddress', 'apptools', 'gevent', 'bsddb', 'pysam', 'enaml', 'enum34', 'pysal', 'atom', 'supervisor', 'whisper', 'pil', 'ndg-httpsclient', 'essbasepy', 'cairo', 'enable', 'kiwisolver', 'traits', 'orange', 'uuid', 'opencv', 'pandasql', 'gdata', 'lcms', 'xlutils', 'pyaudio', 'pyface', 'ssl_match_hostname'}

It seems that anaconda3 [^ 3] of docker hub has also changed to 3.5.

[^ 1]: Python 3.5 release

Recommended Posts

Python 2 series and 3 series (Anaconda edition)
Anaconda and Python version correspondence table
Difference between python2 series and python3 series dict.keys ()
Time series plot started ~ python edition ~
[Python] What is pandas Series and DataFrame?
Python 3.3 in Anaconda
pyenv + anaconda + python3
Easy introduction of python3 series and OpenCV3
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Basic operation of Python Pandas Series and Dataframe (1)
[python] Compress and decompress
Python: Time Series Analysis
A * algorithm (Python edition)
Python and numpy tips
[Python] pip and wheel
First Python 3rd Edition
Batch design and python
Python iterators and generators
Python packages and modules
Vue-Cli and Python integration
Ruby, Python and map
Python time series question
python input and output
Python and Ruby split
Use Python 3.8 with Anaconda
Python3, venv and Ansible
Python asyncio and ContextVar
Python Mathematics Series ① Transpose
Install Python3 on Mac and build environment [Definitive Edition]
python2 series / 3 series, character code and print statement / command line
Install django on python + anaconda and start the server
Python Math Series ② Matrix Multiplication
Python + Anaconda + Pycharm environment construction
Programming with Python and Tkinter
Encryption and decryption with Python
Python: Class and instance variables
Python application: Pandas Part 2: Series
3-3, Python strings and character codes
Python and hardware-Using RS232C with Python-
Python on Ruby and angry Ruby on Python
Python indentation and string format
Python real division (/) and integer division (//)
PyTorch C ++ VS Python (2019 Edition)
Install Python and Flask (Windows 10)
Install Python environment with Anaconda
About python objects and classes
About Python variables and objects
Apache mod_auth_tkt and Python AuthTkt
Å (Ongustromu) and NFC @ Python
I got an error in vim and zsh in Python 3.7 series
Understand Python packages and modules
# 2 [python3] Separation and comment out
Use MySQL from Anaconda (python)
Python shallow copy and deep copy
Anaconda updated from 4.2.0 to 4.3.0 (python3.5 updated to python3.6)
CI environment construction ~ Python edition ~
Python and ruby slice memo
Python Mathematics Series ③ Determinant (replacement)
Python installation and basic grammar
Collaboration between PTVS and Anaconda
I compared Java and Python!