unknown version in python library pyparsing

I received the same error and I’m also in Python 3.6.0 …

AttributeError: 'version_info' object has no attribute '__version__'

If you want to dig a little more, you can type this in your console and detect which package is using this dependency.

> pip show pyparsing

In my case the output was something like this, indicating that packaging:

  • Name: pyparsing
  • Version: 2.4.7
  • Summary: Python parsing module
  • License: MIT License
  • Location:
  • Requires:
  • Required-by: packaging

To fix it, you can go with the suggestion from PaulMcG

pip install pyparsing==2.4.7

Update 2022-Jun-03:

Reference to the issue

https://github.com/pyparsing/pyparsing/releases/tag/pyparsing_3.0.8

Note says:

API CHANGE: modified pyproject.toml to require Python version 3.6.8 or
later for pyparsing 3.x. Earlier minor versions of 3.6 fail in
evaluating the version_info class (implemented using
typing.NamedTuple). If you are using an earlier version of Python 3.6,
you will need to use pyparsing 2.4.7.

Leave a Comment