InvalidArchiveError ARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not rem

InvalidArchiveError

ARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename 

 conda create -n fashion_mnist python=3.8.10

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2022.9.24          |   py38haa95532_0         154 KB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    pip-22.2.2                 |   py38haa95532_0         2.3 MB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    python-3.8.10              |       hdbf39b2_7        15.9 MB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    setuptools-63.4.1          |   py38haa95532_0         1.0 MB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    sqlite-3.39.3              |       h2bbff1b_0         804 KB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    vc-14.2                    |       h21ff451_1           8 KB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    wincertstore-0.2           |   py38haa95532_2          15 KB  http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ------------------------------------------------------------
                                           Total:        20.2 MB

The following NEW packages will be INSTALLED:

  ca-certificates    anaconda/pkgs/main/win-64::ca-certificates-2022.07.19-haa95532_0 None
  certifi            anaconda/pkgs/main/win-64::certifi-2022.9.24-py38haa95532_0 None
  openssl            anaconda/pkgs/main/win-64::openssl-1.1.1q-h2bbff1b_0 None
  pip                anaconda/pkgs/main/win-64::pip-22.2.2-py38haa95532_0 None
  python             anaconda/pkgs/main/win-64::python-3.8.10-hdbf39b2_7 None
  setuptools         anaconda/pkgs/main/win-64::setuptools-63.4.1-py38haa95532_0 None
  sqlite             anaconda/pkgs/main/win-64::sqlite-3.39.3-h2bbff1b_0 None
  vc                 anaconda/pkgs/main/win-64::vc-14.2-h21ff451_1 None
  vs2015_runtime     anaconda/pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2 None
  wheel              anaconda/pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0 None
  wincertstore       anaconda/pkgs/main/win-64::wincertstore-0.2-py38haa95532_2 None


Proceed ([y]/n)? y

Downloading and Extracting Packages
vc-14.2              | 8 KB      | ############################################################################ | 100%
wincertstore-0.2     | 15 KB     | ############################################################################ | 100%
setuptools-63.4.1    | 1.0 MB    | ############################################################################ | 100%
pip-22.2.2           | 2.3 MB    | ############################################################################ | 100%
certifi-2022.9.24    | 154 KB    | ############################################################################ | 100%
python-3.8.10        | 15.9 MB   | ############################################################################ | 100%
sqlite-3.39.3        | 804 KB    | #################################################################################################################4 | 100% WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(143): Could not remove or rename C:\Users\***\anaconda3\pkgs\sqlite-3.39.3-h2bbff1b_0\.cph_tmphk5imi7k\pkg-sqlite-3.39.3-h2bbff1b_0.tar.zst.  Please remove this file manually (you may need to reboot to free file handles)
sqlite-3.39.3        | 804 KB    | ################################################################################################################## | 100%

InvalidArchiveError('Error with archive C:\\Users\\***\\anaconda3\\pkgs\\sqlite-3.39.3-h2bbff1b_0\\.cph_tmphk5imi7k\\pkg-sqlite-3.39.3-h2bbff1b_0.tar.zst.  You probably need to delete and re-download or re-create this file.  Message from libarchive was:\n\nCould not unlink')

1. 管理员运行Anaconda Prompt

2. 删除文件夹:

C:\Users\**\anaconda3\pkgs\sqlite-3.39.3-h2bbff1b_0

sqlite-3.35.4-h2bbff1b_0 
sqlite-3.36.0-h2bbff1b_0 
sqlite-3.39.3-h2bbff1b_0

3. 清除安装缓存

conda clean --alll

4. 修改安装源(C:\Users\***\.condarc)

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

conda config --set show_channel_urls yes

最终解决方法是2,把 C:\Users\**\anaconda3\pkgs下与冲突包同名文件夹(不同版本的)都给删除,然后再重新创建新的虚拟环境

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值