Skip to content

Instantly share code, notes, and snippets.

@weex
Created September 11, 2021 00:36
Show Gist options
  • Save weex/5c7df19b6799e786c86c06aefc26eb46 to your computer and use it in GitHub Desktop.
Save weex/5c7df19b6799e786c86c06aefc26eb46 to your computer and use it in GitHub Desktop.
pip-sync failure
$ pip-sync dev-requirements.txt
Found existing installation: httplib2 0.18.1
Uninstalling httplib2-0.18.1:
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3.9/shutil.py", line 806, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/httplib2' -> '/tmp/pip-uninstall-7q26qd9s'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/dsterry/.local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
status = self.run(options, args)
File "/home/dsterry/.local/lib/python3.9/site-packages/pip/_internal/commands/uninstall.py", line 93, in run
uninstall_pathset = req.uninstall(
File "/home/dsterry/.local/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 633, in uninstall
uninstalled_pathset.remove(auto_confirm, verbose)
File "/home/dsterry/.local/lib/python3.9/site-packages/pip/_internal/req/req_uninstall.py", line 384, in remove
moved.stash(path)
File "/home/dsterry/.local/lib/python3.9/site-packages/pip/_internal/req/req_uninstall.py", line 281, in stash
renames(path, new_path)
File "/home/dsterry/.local/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 331, in renames
shutil.move(old, new)
File "/usr/lib/python3.9/shutil.py", line 818, in move
rmtree(src)
File "/usr/lib/python3.9/shutil.py", line 718, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/usr/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/usr/lib/python3.9/shutil.py", line 675, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/usr/lib/python3.9/shutil.py", line 673, in _rmtree_safe_fd
os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'certs.cpython-39.pyc'
Traceback (most recent call last):
File "/home/dsterry/.local/bin/pip-sync", line 8, in <module>
sys.exit(cli())
File "/home/dsterry/.local/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/home/dsterry/.local/lib/python3.9/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/dsterry/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/dsterry/.local/lib/python3.9/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/dsterry/.local/lib/python3.9/site-packages/piptools/scripts/sync.py", line 171, in cli
sync.sync(
File "/home/dsterry/.local/lib/python3.9/site-packages/piptools/sync.py", line 220, in sync
run( # nosec
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'uninstall', '-y', 'httplib2', 'pycurl', 'pysimplesoap', 'python-apt', 'python-debian', 'python-debianbts', 'reportbug']' returned non-zero exit status 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment