Repository: coala/coala

Issue:
Installation error: ModuleNotFoundError: No module named 'appdirs'
Installing coala-bears resulted in this , which I havent seen before.

```
$ pip install -r requirements.txt ".[alldeps]"
Processing /home/travis/build/jayvdb/coala-bears
Collecting coala-0.12.0.dev99999999999999 from git+https://github.com/coala/coala#egg=coala-0.12.0.dev99999999999999 (from -r requirements.txt (line 3))
  Cloning https://github.com/coala/coala to /tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999
  Running setup.py (path:/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/setup.py) egg_info for package coala-0.12.0.dev99999999999999 produced metadata for project name coala. Fix your #egg=coala-0.12.0.dev99999999999999 fragments.
Collecting HTTPolice~=0.5.2 (from -r bear-requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/3a/b4/ad13fae41373a0734388b7fee1418fb9cdc57662ef46e25bcf805428c187/HTTPolice-0.5.2-py2.py3-none-any.whl
Collecting aenum~=2.0.8 (from -r bear-requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/01/11/e0b5efc82daace980210c1b5f1458676ccc6513514955678801b44f9169c/aenum-2.0.10-py3-none-any.whl
Collecting apertium-lint~=0.29 (from -r bear-requirements.txt (line 3))
Collecting autoflake~=0.7 (from -r bear-requirements.txt (line 4))
Collecting autopep8~=1.2 (from -r bear-requirements.txt (line 5))
Collecting bandit~=1.2 (from -r bear-requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/77/41/d57366098a30a86af1821e231949221d2b6b896cc4bdd060cc1be27fdd47/bandit-1.4.0-py2.py3-none-any.whl
Collecting cmakelint~=1.3 (from -r bear-requirements.txt (line 7))
Collecting cppclean~=0.12.0 (from -r bear-requirements.txt (line 8))
Collecting cpplint~=1.3 (from -r bear-requirements.txt (line 9))
Collecting dennis~=0.9 (from -r bear-requirements.txt (line 10))
  Using cached https://files.pythonhosted.org/packages/2d/2e/2cb43a5e787387b558d2eeefc2713305d2df97c4622cee37b1e6f5505031/dennis-0.9-py2.py3-none-any.whl
Collecting docutils-ast-writer~=0.1.2 (from -r bear-requirements.txt (line 11))
Collecting eradicate~=0.1.6 (from -r bear-requirements.txt (line 12))
Collecting git-url-parse~=1.1.0 (from -r bear-requirements.txt (line 13))
  Using cached https://files.pythonhosted.org/packages/0d/66/3f4a12c4e13aae46aaa8062c3bef12e86478aac1ed31f4c05c3e1887d367/git_url_parse-1.1.0-py3-none-any.whl
Collecting guess-language-spirit~=0.5.2 (from -r bear-requirements.txt (line 14))
Collecting html-linter~=0.4.0 (from -r bear-requirements.txt (line 15))
Collecting isort~=4.2 (from -r bear-requirements.txt (line 16))
  Using cached https://files.pythonhosted.org/packages/1f/2c/22eee714d7199ae0464beda6ad5fedec8fee6a2f7ffd1e8f1840928fe318/isort-4.3.4-py3-none-any.whl
Collecting language-check~=1.0 (from -r bear-requirements.txt (line 17))
Collecting libclang-py3~=3.4.0 (from -r bear-requirements.txt (line 18))
Collecting lxml==3.6.0 (from -r bear-requirements.txt (line 19))
Collecting memento_client~=0.6.1 (from -r bear-requirements.txt (line 20))
  Using cached https://files.pythonhosted.org/packages/41/8d/8dfc683c1228779b2eb6e80681e70d450b20fce58d53483fb6e5c7f6ff34/memento_client-0.6.1-py2.py3-none-any.whl
Collecting munkres3~=1.0 (from -r bear-requirements.txt (line 21))
Collecting mypy-lang~=0.4.6 (from -r bear-requirements.txt (line 22))
Collecting nbformat~=4.1 (from -r bear-requirements.txt (line 23))
  Using cached https://files.pythonhosted.org/packages/da/27/9a654d2b6cc1eaa517d1c5a4405166c7f6d72f04f6e7eea41855fe808a46/nbformat-4.4.0-py2.py3-none-any.whl
Collecting nltk~=3.2 (from -r bear-requirements.txt (line 24))
Collecting proselint~=0.7.0 (from -r bear-requirements.txt (line 25))
Collecting pycodestyle~=2.2 (from -r bear-requirements.txt (line 26))
  Using cached https://files.pythonhosted.org/packages/e5/c6/ce130213489969aa58610042dff1d908c25c731c9575af6935c2dfad03aa/pycodestyle-2.4.0-py2.py3-none-any.whl
Collecting pydocstyle~=2.0 (from -r bear-requirements.txt (line 27))
  Using cached https://files.pythonhosted.org/packages/43/8a/f1141af0c8406788a5c38ad5001d4163d903b5384a6517239d2ac42734c8/pydocstyle-2.1.1-py3-none-any.whl
Collecting pyflakes~=1.5.0 (from -r bear-requirements.txt (line 28))
  Using cached https://files.pythonhosted.org/packages/27/49/924098b3b85c286696f37e014475d79471ffc44509613af420645a3c12cb/pyflakes-1.5.0-py2.py3-none-any.whl
Collecting pylint~=1.7.2 (from -r bear-requirements.txt (line 29))
  Using cached https://files.pythonhosted.org/packages/f8/86/410d53faff049641f34951843245d168261512aea787a1f9f05c3fa025a0/pylint-1.7.6-py2.py3-none-any.whl
Collecting pyroma~=2.2.0 (from -r bear-requirements.txt (line 30))
Collecting pyyaml~=3.12 (from -r bear-requirements.txt (line 31))
Collecting radon==1.4.0 (from -r bear-requirements.txt (line 32))
  Using cached https://files.pythonhosted.org/packages/b1/24/594df18af8141787d8e2d694fbc898fd26f0aa26597fe6f6652cdb773a7f/radon-1.4.0-py2.py3-none-any.whl
Collecting restructuredtext-lint~=1.0.0 (from -r bear-requirements.txt (line 33))
Collecting rstcheck~=3.1 (from -r bear-requirements.txt (line 34))
Collecting safety~=1.8.2 (from -r bear-requirements.txt (line 35))
  Downloading https://files.pythonhosted.org/packages/20/58/701d0b61562a63b7f0008bcfd673617b277ddaa2cde217a398f82c146cd4/safety-1.8.2-py2.py3-none-any.whl
Collecting scspell3k~=2.0 (from -r bear-requirements.txt (line 36))
Collecting vim-vint!=0.3.19,~=0.3.12 (from -r bear-requirements.txt (line 37))
Collecting vulture~=0.25.0 (from -r bear-requirements.txt (line 38))
  Using cached https://files.pythonhosted.org/packages/98/d7/3cc454c33422f1c43255928e7b4bac77a0bcabb113a946997edc60a2a176/vulture-0.25-py2.py3-none-any.whl
Collecting yamllint~=1.6.1 (from -r bear-requirements.txt (line 39))
  Using cached https://files.pythonhosted.org/packages/07/cf/213a023883122cc527bdc5cab135a4e30af93c1a0feaa6cabc16aaee68ac/yamllint-1.6.1-py2.py3-none-any.whl
Collecting yapf~=0.21.0 (from -r bear-requirements.txt (line 40))
  Using cached https://files.pythonhosted.org/packages/6d/0c/65c7318a7f134270ef565d1cdfffdb714a0de1526f9a6c71452552633da7/yapf-0.21.0-py2.py3-none-any.whl
Collecting coala>0.11.* (from coala-bears==0.12.0.dev99999999999999)
  Downloading https://files.pythonhosted.org/packages/24/5c/15242d3079510651c410f56672e6eceabda5b4e53b97344419c79e4239b3/coala-0.12.0.dev20180101025653-py34.py35.py36-none-any.whl (236kB)
    100% |████████████████████████████████| 245kB 4.8MB/s 
Collecting appdirs~=1.4 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Collecting cached_property~=1.4.3 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/88/09/4b7a484f96cbceda746e03f0167021c909c3ceae1c6f2e844d79476cb70e/cached_property-1.4.3-py2.py3-none-any.whl
Collecting cli_helpers~=1.0.2 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/bf/4a/f3a506a57619978e1775279d2bc4435821db1c391087ac02aa20137f765d/cli_helpers-1.0.2-py3-none-any.whl
Collecting coala_utils (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/93/7d/65d619f7a64ac2ea6d43b047e63a8605d1c7193195b52a59c7ea342f5a53/coala_utils-0.7.0-py3-none-any.whl
Collecting colorlog<4.0,>=2.7 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/69/eb/58ae10d3c46a0195ffdd0e3943d255d0d5029d71e5457785ecd665bcf0f3/colorlog-3.1.4-py2.py3-none-any.whl
Collecting dependency_management (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/1d/c7/e1ff3d4b90b1a4197e90bb43c87200ce89c677e26dadbc55cc9f943de47b/dependency_management-0.4.0-py3-none-any.whl
Collecting packaging>=16.8 (from coala->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/ad/c2/b500ea05d5f9f361a562f089fc91f77ed3b4783e13a08a3daf82069b1224/packaging-17.1-py2.py3-none-any.whl
Collecting Pygments~=2.1 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/02/ee/b6e02dc6529e82b75bb06823ff7d005b141037cb1416b10c6f00fc419dca/Pygments-2.2.0-py2.py3-none-any.whl
Collecting PyPrint~=0.2.6 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/b0/45/8912d660c6accfe665f6649433362aa0eb9a94a3a71ee3a71d8956f0a4ed/PyPrint-0.2.6-py3-none-any.whl
Collecting requests~=2.12 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=21.0.0 in /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (from coala->-r requirements.txt (line 3))
Collecting unidiff~=0.5.2 (from coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/68/52/c7278fc3c17d1aaade84597968d88f97f0f4ec7288ddedb6970a341c5170/unidiff-0.5.5-py2.py3-none-any.whl
Collecting dominate>=2.2.0 (from HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
Collecting bitstring>=3.1.4 (from HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
Requirement already satisfied: six>=1.10.0 in /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (from HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
Collecting singledispatch>=3.4.0.3 (from HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/c5/10/369f50bcd4621b263927b0a1519987a04383d4a98fb10438042ad410cf88/singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting defusedxml>=0.5.0 (from HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/87/1c/17f3e3935a913dfe2a5ca85fa5ccbef366bfd82eb318b1f75dadbf0affca/defusedxml-0.5.0-py2.py3-none-any.whl
Collecting brotlipy>=0.5.1 (from HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/b8/e6/be86d2d6565fcf4bd82cca288ac1e264a50dbfa41bef86b63b5d69252fca/brotlipy-0.7.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting GitPython>=1.0.1 (from bandit~=1.2->-r bear-requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/fe/e5/fafe827507644c32d6dc553a1c435cdf882e0c28918a5bab29f7fbebfb70/GitPython-2.1.11-py2.py3-none-any.whl (448kB)
    100% |████████████████████████████████| 450kB 2.7MB/s 
Collecting stevedore>=1.17.1 (from bandit~=1.2->-r bear-requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/a1/d9/93a975469c53a9ee85de9ec0deb12345aa777748b4c263860668592344fe/stevedore-1.29.0-py2.py3-none-any.whl
Collecting click>=6 (from dennis~=0.9->-r bear-requirements.txt (line 10))
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting polib>=1.0.8 (from dennis~=0.9->-r bear-requirements.txt (line 10))
  Using cached https://files.pythonhosted.org/packages/30/a2/e407c3b00cace3d7fc8df14d364deeecfeb96044e1a317de583bc26eae58/polib-1.1.0-py2.py3-none-any.whl
Collecting docutils>=0.12 (from docutils-ast-writer~=0.1.2->-r bear-requirements.txt (line 11))
  Using cached https://files.pythonhosted.org/packages/36/fa/08e9e6e0e3cbd1d362c3bbee8d01d0aedb2155c4ac112b19ef3cae8eed8d/docutils-0.14-py3-none-any.whl
Requirement already satisfied: pbr in /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (from git-url-parse~=1.1.0->-r bear-requirements.txt (line 13))
Collecting docopt>=0.6.1 (from html-linter~=0.4.0->-r bear-requirements.txt (line 15))
Collecting template-remover (from html-linter~=0.4.0->-r bear-requirements.txt (line 15))
Collecting traitlets>=4.1 (from nbformat~=4.1->-r bear-requirements.txt (line 23))
  Using cached https://files.pythonhosted.org/packages/93/d6/abcb22de61d78e2fc3959c964628a5771e47e7cc60d53e9342e21ed6cc9a/traitlets-4.3.2-py2.py3-none-any.whl
Collecting jupyter-core (from nbformat~=4.1->-r bear-requirements.txt (line 23))
  Using cached https://files.pythonhosted.org/packages/1d/44/065d2d7bae7bebc06f1dd70d23c36da8c50c0f08b4236716743d706762a8/jupyter_core-4.4.0-py2.py3-none-any.whl
Collecting jsonschema!=2.5.0,>=2.4 (from nbformat~=4.1->-r bear-requirements.txt (line 23))
  Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting ipython-genutils (from nbformat~=4.1->-r bear-requirements.txt (line 23))
  Using cached https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting future (from proselint~=0.7.0->-r bear-requirements.txt (line 25))
Collecting snowballstemmer (from pydocstyle~=2.0->-r bear-requirements.txt (line 27))
  Using cached https://files.pythonhosted.org/packages/d4/6c/8a935e2c7b54a37714656d753e4187ee0631988184ed50c0cf6476858566/snowballstemmer-1.2.1-py2.py3-none-any.whl
Collecting astroid<1.6,>=1.5.1 (from pylint~=1.7.2->-r bear-requirements.txt (line 29))
  Using cached https://files.pythonhosted.org/packages/9a/a7/d8155abf1c58457f1c65a20208ff128ec403d810dd55c40a39047f1bbddd/astroid-1.5.3-py2.py3-none-any.whl
Collecting mccabe (from pylint~=1.7.2->-r bear-requirements.txt (line 29))
  Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Collecting colorama<0.4,>=0.3 (from radon==1.4.0->-r bear-requirements.txt (line 32))
  Using cached https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Collecting mando<0.4,>=0.3 (from radon==1.4.0->-r bear-requirements.txt (line 32))
  Using cached https://files.pythonhosted.org/packages/4a/77/180f0b61dca785a6b76c4f1ba611100fbc628abeb8415fa7c5c4c5d99e0b/mando-0.3.3-py2.py3-none-any.whl
Requirement already satisfied: pip in /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (from safety~=1.8.2->-r bear-requirements.txt (line 35))
Collecting dparse>=0.4.1 (from safety~=1.8.2->-r bear-requirements.txt (line 35))
  Downloading https://files.pythonhosted.org/packages/8d/89/39cdc1b885e0af65fd172be21c318c3c750d1fbca0582c7b7ffe9873ed78/dparse-0.4.1.tar.gz
Collecting chardet>=2.3.0 (from vim-vint!=0.3.19,~=0.3.12->-r bear-requirements.txt (line 37))
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting ansicolor~=0.2.4 (from vim-vint!=0.3.19,~=0.3.12->-r bear-requirements.txt (line 37))
  Using cached https://files.pythonhosted.org/packages/42/0b/f370fae6d0070758e8bbf46c77da779e4ea79870ea5197893b2678848aeb/ansicolor-0.2.6-py2.py3-none-any.whl
Collecting testfixtures~=4.14.3 (from coala>0.11.*->coala-bears==0.12.0.dev99999999999999)
  Downloading https://files.pythonhosted.org/packages/6c/4e/0381a0ead1f270f0bd2854e3ad40c24242bcf9ee99093e786111f831cad2/testfixtures-4.14.3-py2.py3-none-any.whl (77kB)
    100% |████████████████████████████████| 81kB 10.4MB/s 
Collecting tabulate[widechars]>=0.8.2 (from cli_helpers~=1.0.2->coala->-r requirements.txt (line 3))
Collecting terminaltables>=3.0.0 (from cli_helpers~=1.0.2->coala->-r requirements.txt (line 3))
Collecting sarge~=0.1.4 (from dependency_management->coala->-r requirements.txt (line 3))
Collecting pyparsing>=2.0.2 (from packaging>=16.8->coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/6a/8a/718fd7d3458f9fab8e67186b00abdd345b639976bc7fb3ae722e1b026a50/pyparsing-2.2.0-py2.py3-none-any.whl
Collecting termcolor~=1.1.0 (from PyPrint~=0.2.6->coala->-r requirements.txt (line 3))
Collecting certifi>=2017.4.17 (from requests~=2.12->coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests~=2.12->coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting urllib3<1.24,>=1.21.1 (from requests~=2.12->coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl
Collecting cffi>=1.0.0 (from brotlipy>=0.5.1->HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/6d/c0/47db8f624f3e4e2f3f27be03a93379d1ba16a1450a7b1aacfa0366e2c0dd/cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting gitdb2>=2.0.0 (from GitPython>=1.0.1->bandit~=1.2->-r bear-requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/a9/fb/d3afc4e2a8d506a07af19f125f7a473ae1b56f942ed2ba80776eb8ae23b1/gitdb2-2.0.4-py2.py3-none-any.whl (62kB)
    100% |████████████████████████████████| 71kB 10.8MB/s 
Collecting decorator (from traitlets>=4.1->nbformat~=4.1->-r bear-requirements.txt (line 23))
  Using cached https://files.pythonhosted.org/packages/bc/bb/a24838832ba35baf52f32ab1a49b906b5f82fb7c76b2f6a7e35e140bac30/decorator-4.3.0-py2.py3-none-any.whl
Collecting lazy-object-proxy (from astroid<1.6,>=1.5.1->pylint~=1.7.2->-r bear-requirements.txt (line 29))
  Using cached https://files.pythonhosted.org/packages/65/1f/2043ec33066e779905ed7e6580384425fdc7dc2ac64d6931060c75b0c5a3/lazy_object_proxy-1.3.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting wrapt (from astroid<1.6,>=1.5.1->pylint~=1.7.2->-r bear-requirements.txt (line 29))
Collecting wcwidth; extra == "widechars" (from tabulate[widechars]>=0.8.2->cli_helpers~=1.0.2->coala->-r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.0.0->brotlipy>=0.5.1->HTTPolice~=0.5.2->-r bear-requirements.txt (line 1))
Collecting smmap2>=2.0.0 (from gitdb2>=2.0.0->GitPython>=1.0.1->bandit~=1.2->-r bear-requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/0f/14/e3112808b727f72df9531fc2f00b84d4966e66001748b6883a21c767e902/smmap2-2.0.4-py2.py3-none-any.whl
Building wheels for collected packages: coala-bears, dparse
  Running setup.py bdist_wheel for coala-bears ... done
  Stored in directory: /home/travis/.cache/pip/wheels/b2/ca/19/7a08b6c420c1b225baecb51100ae57c6fcfa6399dbca4158c2
  Running setup.py bdist_wheel for dparse ... done
  Stored in directory: /home/travis/.cache/pip/wheels/4a/8d/fa/d8d1526ad5615bc0fc10502e16dfc2a70802106cba099d2518
Successfully built coala-bears dparse
Installing collected packages: coala, dominate, bitstring, lxml, singledispatch, defusedxml, pycparser, cffi, brotlipy, HTTPolice, aenum, apertium-lint, pyflakes, autoflake, pycodestyle, autopep8, smmap2, gitdb2, GitPython, pyyaml, stevedore, bandit, cmakelint, cppclean, cpplint, click, polib, dennis, docutils, docutils-ast-writer, eradicate, git-url-parse, guess-language-spirit, docopt, template-remover, html-linter, isort, language-check, libclang-py3, certifi, idna, urllib3, chardet, requests, memento-client, munkres3, mypy-lang, decorator, ipython-genutils, traitlets, jupyter-core, jsonschema, nbformat, nltk, future, proselint, snowballstemmer, pydocstyle, lazy-object-proxy, wrapt, astroid, mccabe, pylint, pyroma, colorama, mando, radon, restructuredtext-lint, rstcheck, pyparsing, packaging, dparse, safety, scspell3k, ansicolor, vim-vint, vulture, yamllint, yapf, appdirs, cached-property, wcwidth, tabulate, terminaltables, cli-helpers, testfixtures, termcolor, PyPrint, coala-utils, colorlog, sarge, dependency-management, Pygments, unidiff, coala, coala-bears
  Running setup.py install for coala ... error
    Complete output from command /home/travis/virtualenv/python3.6.3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-n6ktgc2w-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python3.6.3/include/site/python3.6/coala:
    running install
    running build
    running build_py
    running build_manpage
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/setup.py", line 244, in <module>
        cmdclass=SETUP_COMMANDS,
      File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/opt/python/3.6.3/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/opt/python/3.6.3/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/opt/python/3.6.3/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/opt/python/3.6.3/lib/python3.6/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/opt/python/3.6.3/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/opt/python/3.6.3/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/opt/python/3.6.3/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/opt/python/3.6.3/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/opt/python/3.6.3/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/setup.py", line 38, in run
        self.run_command('build_manpage')
      File "/opt/python/3.6.3/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/opt/python/3.6.3/lib/python3.6/distutils/dist.py", line 973, in run_command
        cmd_obj.ensure_finalized()
      File "/opt/python/3.6.3/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/coalib/misc/BuildManPage.py", line 57, in finalize_options
        mod = __import__(mod_name, fromlist=fromlist)
      File "/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/coalib/parsing/DefaultArgParser.py", line 4, in <module>
        from coalib.misc import Constants
      File "/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/coalib/misc/Constants.py", line 3, in <module>
        import appdirs
    ModuleNotFoundError: No module named 'appdirs'
    
    ----------------------------------------
Command "/home/travis/virtualenv/python3.6.3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-n6ktgc2w-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python3.6.3/include/site/python3.6/coala" failed with error code 1 in /tmp/pip-build-d6jpvz9r/coala-0.12.0.dev99999999999999/
```

https://travis-ci.org/jayvdb/coala-bears/jobs/407420330


Discussion:
And again.

https://travis-ci.org/jayvdb/coala-bears/jobs/407430184

Some package may have been updated and forced appdirs higher up the list, or some other intricacy of pip ordering of requirements has been encountered.
This occurs because `BuildManPage` loads `setup.cfg` entry `build_manpage.parser`, which is `coalib.parsing.DefaultArgParser:default_arg_parser`.

Whilst loading `DefaultArgParser`, it runs into the need to import `appdirs` and that hasnt been installed yet.

It appears this has been around for a long time, and we just havent triggered it yet.
Possibly pip 9 enhancements are why it is occurring now.

`coalib/parsing/DefaultArgParser.py`:

* 42de3b154 `(Kaushik Ramachandran    2016-01-08 21:30:24 +0530   4) from coalib.misc import Constants`
* 71168956e `(Attila Tovt             2016-04-30 13:45:27 +0200   5) from coalib.collecting.Collectors import get_all_bears_names`
* 832a7cb3e `(Aashutosh Rathi         2017-11-23 20:04:02 +0530   6) from coalib.parsing.filters import available_filters`

`coalib/misc/Constants.py`:

* 331406c21 `(Attila Tovt          2016-03-17 11:48:14 +0200   3) import appdirs`

The constants that we use in `DefaultArgParser` are

* `VERSION` , which is imported from `coalib`
* `default_coafile` (x 3) which is `.coafile`

So we could easily remove the `Constants` import.

But then the next problem will be that `coalib.collecting.Collectors` imports `coalib.collecting.Importers` which imports from `coala_utils`, another separate package, which can cause the same problem as `appdirs`.

There is no way that `DefaultArgParser` (as-is) can be the parser mentioned in `setup.cfg` as is currently the case.
https://github.com/coala/coala/pull/5645 turned out to be quite useful for solving the harder part of this, being the `Collectors` import.

`filters` relies on nothing external.

Now I just need to drop the hard dependency on `appdirs`.
Easy!

Resolving patch:
diff --git a/coalib/misc/CachingUtilities.py b/coalib/misc/CachingUtilities.py
--- a/coalib/misc/CachingUtilities.py
+++ b/coalib/misc/CachingUtilities.py
@@ -3,7 +3,15 @@
 import os
 import pickle
 
+import appdirs
+
 from coalib.misc import Constants
+from coalib import VERSION
+
+USER_DATA_DIR = appdirs.user_data_dir('coala', version=VERSION)
+# USER_DATA_DIR was originally defined in Constants, and is set for backwards
+# compatibility, however access outside of CachingUtilities is deprecated.
+Constants.USER_DATA_DIR = USER_DATA_DIR
 
 
 def get_data_path(log_printer, identifier):
diff --git a/coalib/misc/Constants.py b/coalib/misc/Constants.py
--- a/coalib/misc/Constants.py
+++ b/coalib/misc/Constants.py
@@ -1,10 +1,14 @@
 # -*- coding: utf-8 -*-
 
-import appdirs
+__all__ = (
+    'VERSION',
+)
+
 import os
 import re
 import logging
 
+# Do not import any libraries here, directly or via other coalib modules.
 from coalib import VERSION
 
 
@@ -126,7 +130,8 @@ def get_system_coafile(coalib_root):
 
 default_coafile = '.coafile'
 
-USER_DATA_DIR = appdirs.user_data_dir('coala', version=VERSION)
+# USER_DATA_DIR will be set here when CachingUtilities loads, however
+# access to it from outside of CachingUtilities is deprecated.
 
 GLOBBING_SPECIAL_CHARS = '()[]|?*'
 


Test patch: