Project Paper A4 5mm

清書したメモが置かれる

seabornがインストールできない

実行環境

Ubuntu

seabornがインストールできない

$ sudo pip install seaborn --no-cache-dir
pipでseabornをインストールしようとすると,AttributeError: 'module' object has no attribute '_base'といわれてerrorになってしまった.

beautifulsoup4を更新

beautifulsoup4とhtml5libを更新(またはインストール)すると直る.
おそらく,beautifulsoup4だけで直る.

$ sudo pip install --upgrade beautifulsoup4
$ sudo pip insatll --upgrade html5lib

LOG

pi@raspberrypi:~ $ sudo pip install seaborn --no-cache-dir
Collecting seaborn
  Downloading seaborn-0.8.1.tar.gz (178kB)
    100% |████████████████████████████████| 184kB 3.1MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-oPGq1l/seaborn/setup.py", line 66, in <module>
        install_requires = check_dependencies()
      File "/tmp/pip-build-oPGq1l/seaborn/setup.py", line 58, in check_dependencies
        import pandas
      File "/usr/lib/python2.7/dist-packages/pandas/__init__.py", line 45, in <module>
        from pandas.io.api import *
      File "/usr/lib/python2.7/dist-packages/pandas/io/api.py", line 10, in <module>
        from pandas.io.html import read_html
      File "/usr/lib/python2.7/dist-packages/pandas/io/html.py", line 25, in <module>
        import bs4
      File "/usr/lib/python2.7/dist-packages/bs4/__init__.py", line 30, in <module>
        from .builder import builder_registry, ParserRejectedMarkup
      File "/usr/lib/python2.7/dist-packages/bs4/builder/__init__.py", line 311, in <module>
        from . import _html5lib
      File "/usr/lib/python2.7/dist-packages/bs4/builder/_html5lib.py", line 57, in <module>
        class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
    AttributeError: 'module' object has no attribute '_base'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-oPGq1l/seaborn/

pi@raspberrypi:~ $ sudo pip install --upgrade beautifulsoup4 --no-cache-dir
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.6.0-py2-none-any.whl (86kB)
    100% |████████████████████████████████| 92kB 1.9MB/s 
Installing collected packages: beautifulsoup4
  Found existing installation: beautifulsoup4 4.3.2
    DEPRECATION: Uninstalling a distutils installed project (beautifulsoup4) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling beautifulsoup4-4.3.2:
      Successfully uninstalled beautifulsoup4-4.3.2
Successfully installed beautifulsoup4-4.6.0
pi@raspberrypi:~ $ sudo pip install seaborn --no-cache-dirCollecting seaborn
  Downloading seaborn-0.8.1.tar.gz (178kB)
    100% |████████████████████████████████| 184kB 2.8MB/s 
Installing collected packages: seaborn
  Running setup.py install for seaborn ... done
Successfully installed seaborn-0.8.1