Ubuntu 14.04 LTS is too old for development

workspace

#1

While it is understandable for production purposes to stick to a LTS version, ubuntu 14.04 LTS gets increasingly painful for development.

I now have to spend hours to get a working development environment because newer packages are just not playing well with a version now four years old.

At the moment I am stuck with this weird error:

(venv36) jmfrank63:~/workspace (master) $ python
Python 3.6.4 (default, Feb 22 2018, 15:01:48) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyring
Traceback (most recent call last):
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/cffi/cparser.py", line 276, in _parse
    ast = _get_parser().parse(fullcsource)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/pycparser/c_parser.py", line 152, in parse
    debug=debuglevel)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/pycparser/ply/yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
    r = errorfunc(token)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/pycparser/c_parser.py", line 1761, in p_error
    column=self.clex.find_tok_column(p)))
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/pycparser/plyparser.py", line 66, in _parse_error
    raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: <cdef source string>:4:70: before: LPTSTR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/__init__.py", line 3, in <module>
    from .core import (set_keyring, get_keyring, set_password, get_password,
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/core.py", line 153, in <module>
    init_backend()
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/core.py", line 66, in init_backend
    keyrings = filter(limit, backend.get_all_keyring())
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/util/__init__.py", line 21, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/backend.py", line 184, in get_all_keyring
    _load_backends()
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/backend.py", line 142, in _load_backends
    list(map(_load_backend, backends))
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/backend.py", line 133, in _load_backend
    mod = importlib.import_module('.' + name, package)
  File "/home/ubuntu/.pyenv/versions/3.6.4/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/keyring/backends/Windows.py", line 12, in <module>
    from win32ctypes.pywin32 import pywintypes
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/win32ctypes/pywin32/__init__.py", line 11, in <module>
    from win32ctypes.pywin32 import win32api
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/win32ctypes/pywin32/win32api.py", line 12, in <module>
    from win32ctypes.core import _common, _kernel32, _backend
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/win32ctypes/core/__init__.py", line 20, in <module>
    from .cffi import _advapi32, _common, _kernel32
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/win32ctypes/core/cffi/_advapi32.py", line 14, in <module>
    from ._kernel32 import _GetACP
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/win32ctypes/core/cffi/_kernel32.py", line 50, in <module>
    """)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/cffi/api.py", line 107, in cdef
    self._cdef(csource, override=override, packed=packed)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/cffi/api.py", line 121, in _cdef
    self._parser.parse(csource, override=override, **options)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/cffi/cparser.py", line 315, in parse
    self._internal_parse(csource)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/cffi/cparser.py", line 320, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/cffi/cparser.py", line 278, in _parse
    self.convert_pycparser_error(e, csource)
  File "/home/ubuntu/.pyenv/versions/venv36/lib/python3.6/site-packages/cffi/cparser.py", line 307, in convert_pycparser_error
    raise CDefError(msg)
cffi.error.CDefError: cannot parse "typedef WINBOOL  volatile volatile const( *ENUMRESTYPEPROC) (HANDLE, LPTSTR, LONG_PTR);"
<cdef source string>:4:70: before: LPTSTR

There is not a single reference on the internet to this error because nobody has the idea of running python 3.6.4 on an ubuntu 14.04 LTS.


#2

While I figured it out to be related to the Windows keyring that fails and I just commented it out, the issue of using a four year old OS for development is contra productive.