Я пытаюсь очистить все пакеты python2.7, которые были установлены с помощью pip.
Поэтому я использую эту команду:
sudo pip freeze | xargs pip uninstall -y
Но я получаюэта ошибка:
Uninstalling pandocfilters-1.4.2:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/commands/uninstall.py", line 68, in run
auto_confirm=options.yes, verbose=self.verbosity > 0,
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/req/req_install.py", line 661, in uninstall
uninstalled_pathset.remove(auto_confirm, verbose)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/req/req_uninstall.py", line 219, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/utils/misc.py", line 273, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pandocfilters-1.4.2.dist-info/DESCRIPTION.rst'