Cannot uninstall python3 selenium package METADATA error

15 Views Asked by At

I am new on Ubuntu, I am trying to uninstall selenium package in python. It gives me an error of permission denied METADATA. I am only user on linux machine and administrator.

I type the code:

 pip uninstall selenium

error is

Proceed (Y/n)? Y
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/shutil.py", line 816, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/dist-packages/selenium-4.10.0.dist-info/' -> '/tmp/pip-uninstall-ol0rk4kb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
    status = run_func(*args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/uninstall.py", line 97, in run
    uninstall_pathset = req.uninstall(
  File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line 638, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/usr/lib/python3/dist-packages/pip/_internal/req/req_uninstall.py", line 369, in remove
    moved.stash(path)
  File "/usr/lib/python3/dist-packages/pip/_internal/req/req_uninstall.py", line 267, in stash
    renames(path, new_path)
  File "/usr/lib/python3/dist-packages/pip/_internal/utils/misc.py", line 305, in renames
    shutil.move(old, new)
  File "/usr/lib/python3.10/shutil.py", line 834, in move
    rmtree(src)
  File "/usr/lib/python3.10/shutil.py", line 725, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.10/shutil.py", line 681, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib/python3.10/shutil.py", line 679, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'METADATA'
0

There are 0 best solutions below