Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/352.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Conda SafetyError:文件大小不正确_Python_Anaconda - Fatal编程技术网

Python Conda SafetyError:文件大小不正确

Python Conda SafetyError:文件大小不正确,python,anaconda,Python,Anaconda,当使用Conda create-n env_name python=3.6创建Conda环境时,我收到了下面的警告 Preparing transaction: done Verifying transaction: \ SafetyError: The package for python located at /anaconda3/pkgs/python-3.6.8-haf84260_0 appears to be corrupted. The path 'lib/python3.6/di

当使用Conda create-n env_name python=3.6创建Conda环境时,我收到了下面的警告

Preparing transaction: done
Verifying transaction: \ 
SafetyError: The package for python located at /anaconda3/pkgs/python-3.6.8-haf84260_0
appears to be corrupted. The path 'lib/python3.6/distutils/unixccompiler.py'
has an incorrect size.
  reported size: 14583 bytes
  actual size: 14902 bytes

done
Executing transaction: done
如错误消息所述,只有Python 3.6.8文件损坏,使用
conda create-n env_name Python=3.6.3
时没有警告

问题:

  • 我没碰过这个编译文件。这种腐败的典型原因是什么

  • 如何在不重新安装Conda的情况下修复此损坏


    • conda clean-a
      ()命令将

      删除索引缓存、锁定文件、未使用的缓存包和tarball

      这并没有解决重复执行
      conda create
      命令时出现的
      SafetyError

      相反,使用以下方法删除了有问题的目录:

      /bin/rm -rf /anaconda3/pkgs/python-3.6.8-haf84260_0
      

      重复执行
      conda create
      命令时下载了内容。

      conda install-f packaging我建议尝试此操作。警告发生在env创建期间,与包安装无关@AnkushRasgonI在将包从一个env克隆到另一个env时遇到了与“r-base”相同的问题。刚在安装时,从
      environment.yml
      文件创建新环境时发生了这种情况。