Before marking it duplicate, please read it fully.
I am trying to use pydot in my script which depends on pyparsing module. But the module I have is pyparsing 2.0.1 which came with the MAC installation. This needs to be downgraded to 1.5.7 to fix this error - "Couldn't import dot_parser, loading of dot files will not be possible" as per this answer, but when I tried to uninstall my existing pyparsing module, I am getting this error -
pip uninstall pyparsing
DEPRECATION: Uninstalling a distutils installed project (pyparsing) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling pyparsing-2.0.1:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pyparsing-2.0.1-py2.7.egg-info
Proceed (y/n)?
If I give yes, as expected, this is throwing me Operation not permitted error due to the System Integrity Protection in Mac OS X. So I am not able to proceed with this.
I tried to see my module path,
import site; site.getsitepackages()
['/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/Library/Python/2.7/site-packages']
I can see pyparsing 2.0.1 under my site-packages as well, Is there a way to uninstall that alone without modifying the pyparsing under system library?