错误conda.core.link:_execute(701):更新conda包时出错

2024-09-30 01:28:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法更新我的基本conda环境。有人知道如何解决这个问题吗

conda update -n base --all

它返回:

Collecting package metadata (current_repodata.json): done
Solving environment: \ 
Warning: 2 possible package resolutions (only showing differing packages):
  - conda-forge/noarch::sphinx-3.5.3-pyhd8ed1ab_0, conda-forge/osx-64::docutils-0.17-py37hf985489_0
  - conda-forge/noarch::sphinx-3.5.4-pyh44b312d_0, conda-forge/osx-64::docutils-0.15.2-py37hf985489done

## Package Plan ##

  environment location: /Users/winkulvichit/miniconda3


The following NEW packages will be INSTALLED:

  argon2-cffi        conda-forge/osx-64::argon2-cffi-20.1.0-py37hf967b71_2
  lcms2              conda-forge/osx-64::lcms2-2.12-h577c468_0
  libdeflate         conda-forge/osx-64::libdeflate-1.7-h35c211d_5
  olefile            conda-forge/noarch::olefile-0.46-pyh9f0ad1d_1
  openjpeg           conda-forge/osx-64::openjpeg-2.4.0-h6cbf5cd_0
  pillow             conda-forge/osx-64::pillow-8.1.2-py37hd4e48bc_1
  seaborn-base       conda-forge/noarch::seaborn-base-0.11.1-pyhd8ed1ab_1

The following packages will be UPDATED:

  apscheduler                          3.6.3-py37hc8dfbb8_1 --> 3.7.0-py37hf985489_0
  bzip2                                    1.0.8-h0b31af3_2 --> 1.0.8-hc929b4f_4
  htslib                                              1.3-0 --> 1.12-hc38c3fb_1
  jupyter            conda-forge/noarch::jupyter-1.0.0-py_2 --> conda-forge/osx-64::jupyter-1.0.0-py37hf985489_6
  libllvm9                                 9.0.1-h7475705_1 --> 9.0.1-h223d4b2_3
  matplotlib                                        3.2.1-0 --> 3.4.1-py37hf985489_0
  matplotlib-base                      3.2.1-py37hddda452_0 --> 3.4.1-py37hb018525_0
  notebook           conda-forge/osx-64::notebook-6.0.3-py~ --> conda-forge/noarch::notebook-6.3.0-pyha770c72_1
  r-irkernel                              1.1-r40h6115d3f_1 --> 1.1.1-r40h6115d3f_0
  samtools                                          1.3.1-0 --> 1.12-hfcfc997_1
  scikit-learn                        0.23.1-py37hf5857e7_0 --> 0.24.1-py37hbcf18d0_0
  seaborn                                       0.10.1-py_0 --> 0.11.1-hd8ed1ab_1
  spyder-terminal    spyder-ide::spyder-terminal-0.3.1-py3~ --> conda-forge::spyder-terminal-0.5.0-py37hf985489_2

The following packages will be SUPERSEDED by a higher-priority channel:

  python.app                 pkgs/main::python.app-2-py37_9 --> conda-forge::python.app-1.3-py37hf967b71_4

The following packages will be DOWNGRADED:

  tzlocal                                  2.1-pyh9f0ad1d_0 --> 2.0.0-py_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(701): An error occurred while installing package 'conda-forge::python.app-1.3-py37hf967b71_4'.
Rolling back transaction: done

LinkError: post-link script failed for package conda-forge::python.app-1.3-py37hf967b71_4
location of failed script: /Users/winkulvichit/miniconda3/bin/.python.app-post-link.sh
==> script messages <==
<None>
==> script output <==
stdout: 
stderr: ln: ./lib: File exists

return code: 1

()

我在互联网上找不到任何解决方案。如果有任何方法来解决这个问题,而不必重新安装康达将不胜感激。谢谢大家!


Tags: theapppackagebasepackagesbecondawill
1条回答
网友
1楼 · 发布于 2024-09-30 01:28:05

我有一个类似的问题,但我解决了。这是我的解决办法。 操作系统:MacOSX

  1. 运行以下命令

    conda install python.app -c conda-forge -v

  2. 在输出中,您将发现以下内容

    Verifying transaction: ...working... done
    Executing transaction: ...working...
    ===> UNLINKING PACKAGE: 
     https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-64::certifi-2021.10.8-py37hecd8cb5_0 
     <===
    
      prefix=/Users/huaweiwang/opt/anaconda3
    ===> LINKING PACKAGE: conda-forge::certifi-2021.10.8-py37hf985489_0 <===
    
    prefix=/Users/***/opt/anaconda3
    source=/Users/**/opt/anaconda3/pkgs/certifi-2021.10.8-py37hf985489_0
    ...
    
    
  3. 我们只关心前缀prefix=/Users/***/opt/anaconda3

  4. 您将在$prefix/python.app/Contents/中找到lib目录

  5. lib重命名为lib.bak

  6. 再次安装python.app,您将成功

    conda install python.app -c conda-forge -v

相关问题 更多 >

    热门问题