我正在尝试简单卸载/安装此软件包,并在成功卸载后出现以下错误
python -m pip uninstall pywin32
...
Successfully uninstalled pywin32-227
...
PermissionError: [WinError 5] Access is denied: 'c:\\python36\\lib\\site-packages\\~0win32_system32\\pythoncom36.dll'
我试过以下几件事:
20.0.2
,因为最新版本21.0.1
出现了相同的问题下面的完整回溯:
ERROR: Exception:
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "C:\Python36\lib\site-packages\pip\_internal\commands\uninstall.py", line 82, in run
uninstall_pathset.commit()
File "C:\Python36\lib\site-packages\pip\_internal\req\req_uninstall.py", line 450, in commit
self._moved_paths.commit()
File "C:\Python36\lib\site-packages\pip\_internal\req\req_uninstall.py", line 290, in commit
save_dir.cleanup()
File "C:\Python36\lib\site-packages\pip\_internal\utils\temp_dir.py", line 175, in cleanup
rmtree(self._path)
File "C:\Python36\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Python36\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "C:\Python36\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Python36\lib\site-packages\pip\_vendor\six.py", line 703, in reraise
raise value
File "C:\Python36\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Python36\lib\site-packages\pip\_internal\utils\misc.py", line 136, in rmtree
onerror=rmtree_errorhandler)
File "C:\Python36\lib\shutil.py", line 500, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Python36\lib\shutil.py", line 395, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Python36\lib\shutil.py", line 393, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'c:\\python36\\lib\\site-
packages\\~1win32_system32\\pythoncom36.dll'
我在我的Windows计算机上遇到了同样的问题
试试这个
另外,要升级
pip
相关问题 更多 >
编程相关推荐