I happen to have some unused/obsolete python libraries in System directory, especially in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python, the issue is that I can't delete any file in the library anymore. I guess it's happening after upgrading to 10.11.
I tried sudo rm -rf, but I just can't delete any file in it.
python> sudo rm -rf *.pyc
Password:
rm: easy_install.pyc: Operation not permitted
rm: pkg_resources.pyc: Operation not permitted
rm: pylab.pyc: Operation not permitted
rm: pyparsing.pyc: Operation not permitted
rm: six.pyc: Operation not permitted
What might be done to remove them?

xattr, still rely on the system-installed python 2.7 - even as of Catalina. – benwiggy Jan 29 '20 at 14:34