Im working with python 2.7 and I was having import errors with random, So I checked the path and noticed it was using random.pyc instead of random.py
I tried to remove the file but it won't work.
sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.pyc
and rm -R gives me this error even when I say y
sudo rm -R /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.pyc override rw-r--r-- root/wheel restricted,compressed for /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.pyc? y rm: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.pyc: Operation not permitted
What should I do?
Edit: My whole "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/" is full of .pyc and .pyo files and import doesn't work on any of them (unless I use idle)