pyparsing icon indicating copy to clipboard operation
pyparsing copied to clipboard

ImportError: cannot import name 'Literal' from 'pyparsing' (unknown location) python

Open gillian911911 opened this issue 2 years ago • 2 comments

gillian911911 avatar Aug 20 '22 14:08 gillian911911

File "D:\anaconda3\envs\torch12\lib\site-packages\matplotlib\fontconfig_pattern.py", line 15, in from pyparsing import (Literal, ZeroOrMore, Optional, Regex, StringEnd, ImportError: cannot import name 'Literal' from 'pyparsing' (unknown location)

could you please provide some help? thanks

gillian911911 avatar Aug 20 '22 14:08 gillian911911

Literal has been in every version of pyparsing as far back as 0.9, so I suspect there is something in your PYTHONPATH that is masking the pyparsing module itself. Do you possibly have a pyparsing.py script somewhere in your development directories?

ptmcg avatar Aug 21 '22 15:08 ptmcg

Closing this for now - please reopen if you have further notes on how to reproduce this issue.

Thanks for using pyparsing!

ptmcg avatar Nov 06 '22 23:11 ptmcg