I am trying to install airnotifier on my machine, I am getting this error
My python version is 3.6
PS C:airnotifier> python app.py
Traceback (most recent call last):
File "app.py", line 32, in <module>
from pushservices.bootstrap import init_messaging_agents
File "C:airnotifierpushservicesbootstrap.py", line 4, in <module>
from .fcm import FCMClient
File "C:airnotifierpushservicesfcm.py", line 5, in <module>
from oauth2client.service_account import ServiceAccountCredentials
File "C:UserssmacrsadminAppDataLocalProgramsPythonPython36libsite-packagesoauth2clientservice_account.py", line 25, in <module>
from oauth2client import client
File "C:UserssmacrsadminAppDataLocalProgramsPythonPython36libsite-packagesoauth2clientclient.py", line 39, in <module>
from oauth2client import transport
File "C:UserssmacrsadminAppDataLocalProgramsPythonPython36libsite-packagesoauth2clienttransport.py", line 17, in <module>
import httplib2
File "C:UserssmacrsadminAppDataLocalProgramsPythonPython36libsite-packageshttplib2__init__.py", line 52, in <module>
from . import auth
File "C:UserssmacrsadminAppDataLocalProgramsPythonPython36libsite-packageshttplib2auth.py", line 4, in <module>
import pyparsing as pp
File "C:UserssmacrsadminAppDataLocalProgramsPythonPython36libsite-packagespyparsing__init__.py", line 130, in <module>
__version__ = __version_info__.__version__
AttributeError: 'version_info' object has no attribute '__version__'
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0