Exception: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\shutil.py", line 557, in move os.rename(src, real_dst) PermissionError: [WinError 5] 拒绝访问。: 'c:\\programdata\\anaconda3\\lib\\site-packages\\numpy' -> 'C:\\Users\\30639\\AppData\\Local\\Temp\\pip-uninstall-aa4gj48h\\programdata\\anaconda3\\lib\\site-packages\\numpy' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\basecommand.py", line 228, in main status = self.run(options, args) File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\commands\uninstall.py", line 68, in run auto_confirm=options.yes, verbose=self.verbosity > 0, File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 661, in uninstall uninstalled_pathset.remove(auto_confirm, verbose) File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\req\req_uninstall.py", line 219, in remove renames(path, new_path) File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\utils\misc.py", line 273, in renames shutil.move(old, new) File "C:\ProgramData\Anaconda3\lib\shutil.py", line 569, in move rmtree(src) File "C:\ProgramData\Anaconda3\lib\shutil.py", line 507, in rmtree return _rmtree_unsafe(path, onerror) File "C:\ProgramData\Anaconda3\lib\shutil.py", line 391, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "C:\ProgramData\Anaconda3\lib\shutil.py", line 389, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 5] 拒绝访问。: 'c:\\programdata\\anaconda3\\lib\\site-packages\\numpy\\add_newdocs.py'
时间: 2023-08-29 13:09:40 浏览: 210
Mac下anaconda中Spyder打开报错Traceback(most recent call last)…问题
5星 · 资源好评率100%
这个报错信息是在卸载numpy模块的时候出现的,提示你没有权限访问文件夹或文件。
解决方法:
1. 以管理员身份运行Anaconda Prompt或命令行工具,然后再试一下卸载numpy模块。
2. 如果管理员身份也无法卸载numpy模块,可以手动删除numpy模块的文件夹。
(1)找到numpy模块在你的电脑上的安装路径,一般在“C:\ProgramData\Anaconda3\Lib\site-packages\numpy”文件夹下。
(2)删除该文件夹及其子文件夹。
(3)重新安装numpy模块。
注意:在删除numpy模块文件夹之前,请备份重要的数据和代码,以免数据丢失。
阅读全文