如何解决conda包安装版本冲突

问题描述 投票:0回答:1

在conda软件包安装中发现和解决软件包版本冲突的最佳做法是什么?

有时,当我试图安装或更新一个软件包时,我会收到关于软件包版本冲突的错误信息。一个包想要a版本,但另一个包不能用a版本,等等。有时这些冲突是复杂的,甚至是循环的(无法解决)。想知道是否有一个包或应用程序等可以使这种情况更容易找到解决方案。

package conda
1个回答
0
投票

基本上,你必须输入 conda update基本上,它显然会给你一个错误。

(base) C:\Users\aravt.LAPTOP-HICLL1JN>conda update

CondaValueError: no package names supplied
# If you want to update to a newer version of Anaconda, type:
#
# $ conda update --prefix C:\Users\aravt.LAPTOP-HICLL1JN\anaconda3 anaconda

你会在你的anaconda提示中看到这个。

第1步:

复制目录,例如在我的情况下,

conda update --prefix C:\Users\aravt.LAPTOP-HICLL1JN\anaconda3 anaconda

你将不得不复制这个

第2步:你会看到这个。

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\aravt.LAPTOP-HICLL1JN\anaconda3

  added / updated specs:
    - anaconda


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    bcrypt-3.1.7               |   py37he774522_1          39 KB
    beautifulsoup4-4.9.1       |           py37_0         169 KB
    bitarray-1.2.2             |   py37he774522_0          83 KB
    bottleneck-1.3.2           |   py37h2a96729_1         107 KB
    comtypes-1.1.7             |        py37_1001         237 KB
    dask-2.17.2                |             py_0          14 KB
    dask-core-2.17.2           |             py_0         585 KB
    dill-0.3.1.1               |           py37_1         135 KB
    docutils-0.16              |           py37_1         664 KB
    fast-histogram-0.9         |   py37h2a96729_0          27 KB
    fsspec-0.7.4               |             py_0          63 KB
    future-0.18.2              |           py37_1         646 KB
    hypothesis-5.16.1          |             py_0         233 KB
    json5-0.9.5                |             py_0          22 KB
    libxml2-2.9.10             |       h464c3ec_1         1.5 MB
    libxslt-1.1.34             |       he774522_0         399 KB
    lxml-4.5.1                 |   py37h1350720_0         940 KB
    plotly-4.8.1               |             py_0         2.4 MB
    prompt-toolkit-3.0.5       |             py_0         245 KB
    prompt_toolkit-3.0.5       |                0          11 KB
    pytest-doctestplus-0.7.0   |             py_0          21 KB
    setuptools-47.1.1          |           py37_0         538 KB
    six-1.15.0                 |             py_0          13 KB
    sphinx-3.0.4               |             py_0         1.1 MB
    xlsxwriter-1.2.9           |             py_0         112 KB
    ------------------------------------------------------------
                                           Total:        10.2 MB

The following packages will be UPDATED:

  bcrypt                               3.1.7-py37he774522_0 --> 3.1.7-py37he774522_1
  beautifulsoup4                               4.9.0-py37_0 --> 4.9.1-py37_0
  bitarray                             1.2.1-py37he774522_0 --> 1.2.2-py37he774522_0
  bottleneck                           1.3.2-py37h2a96729_0 --> 1.3.2-py37h2a96729_1
  comtypes                                     1.1.7-py37_0 --> 1.1.7-py37_1001
  dask                                          2.17.0-py_0 --> 2.17.2-py_0
  dask-core                                     2.17.0-py_0 --> 2.17.2-py_0
  dill                                       0.3.1.1-py37_0 --> 0.3.1.1-py37_1
  docutils                                      0.16-py37_0 --> 0.16-py37_1
  fast-histogram                      0.8-py37h2a96729_1000 --> 0.9-py37h2a96729_0
  fsspec                                         0.7.1-py_0 --> 0.7.4-py_0
  future                                      0.18.2-py37_0 --> 0.18.2-py37_1
  hypothesis                                    5.11.0-py_0 --> 5.16.1-py_0
  json5                                          0.9.4-py_0 --> 0.9.5-py_0
  libxml2                                  2.9.9-h464c3ec_0 --> 2.9.10-h464c3ec_1
  libxslt                                 1.1.33-h579f668_0 --> 1.1.34-he774522_0
  lxml                                 4.5.0-py37h1350720_0 --> 4.5.1-py37h1350720_0
  plotly                                         4.7.1-py_0 --> 4.8.1-py_0
  prompt-toolkit                                 3.0.4-py_0 --> 3.0.5-py_0
  prompt_toolkit                                    3.0.4-0 --> 3.0.5-0
  pytest-doctestplus                             0.5.0-py_0 --> 0.7.0-py_0
  setuptools                                  46.4.0-py37_0 --> 47.1.1-py37_0
  six                   pkgs/main/win-64::six-1.14.0-py37_0 --> pkgs/main/noarch::six-1.15.0-py_0
  sphinx                                         3.0.3-py_0 --> 3.0.4-py_0
  xlsxwriter                                     1.2.8-py_0 --> 1.2.9-py_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
sphinx-3.0.4         | 1.1 MB    | ############################################################################ | 100%
dask-core-2.17.2     | 585 KB    | ############################################################################ | 100%
bottleneck-1.3.2     | 107 KB    | ############################################################################ | 100%
bcrypt-3.1.7         | 39 KB     | ############################################################################ | 100%
prompt-toolkit-3.0.5 | 245 KB    | ############################################################################ | 100%
xlsxwriter-1.2.9     | 112 KB    | ############################################################################ | 100%
setuptools-47.1.1    | 538 KB    | ############################################################################ | 100%
fast-histogram-0.9   | 27 KB     | ############################################################################ | 100%
six-1.15.0           | 13 KB     | ############################################################################ | 100%
hypothesis-5.16.1    | 233 KB    | ############################################################################ | 100%
future-0.18.2        | 646 KB    | ############################################################################ | 100%
dill-0.3.1.1         | 135 KB    | ############################################################################ | 100%
pytest-doctestplus-0 | 21 KB     | ############################################################################ | 100%
plotly-4.8.1         | 2.4 MB    | ############################################################################ | 100%
fsspec-0.7.4         | 63 KB     | ############################################################################ | 100%
prompt_toolkit-3.0.5 | 11 KB     | ############################################################################ | 100%
bitarray-1.2.2       | 83 KB     | ############################################################################ | 100%
dask-2.17.2          | 14 KB     | ############################################################################ | 100%
lxml-4.5.1           | 940 KB    | ############################################################################ | 100%
json5-0.9.5          | 22 KB     | ############################################################################ | 100%
comtypes-1.1.7       | 237 KB    | ############################################################################ | 100%
docutils-0.16        | 664 KB    | ############################################################################ | 100%
beautifulsoup4-4.9.1 | 169 KB    | ############################################################################ | 100%
libxslt-1.1.34       | 399 KB    | ############################################################################ | 100%
libxml2-2.9.10       | 1.5 MB    | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

在它问你是要取消交易还是执行交易的部分,一定要输入y。

之后,你就不会再遇到提示中的冲突了,因为你有最新版本的anaconda,祝你好运!!

© www.soinside.com 2019 - 2024. All rights reserved.