如何修复 conda 中的包解析警告?

2022-01-10 00:00:00 python conda anaconda

问题描述

每当我尝试 conda update --allconda install package_name 时,我都会收到一些关于 tensorflow-gpu 的包解析警告.

Whenever I tried to conda update --all or conda install package_name I keep getting few package resolution warnings regarding tensorflow-gpu.

我不知道如何修复它们?非常感谢任何帮助.

I couldn't figure out how to fix them? I would really appreciate any help.

这是我的 conda infoconda list

C:WINDOWSsystem32>conda info

     active environment : None
            shell level : 0
       user config file : C:UsersAdmin.condarc
 populated config files : C:UsersAdmin.condarc
          conda version : 4.7.5
    conda-build version : 3.18.6
         python version : 3.7.3.final.0
       virtual packages : __cuda=10.2
       base environment : C:UsersAdminAnaconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:UsersAdminAnaconda3pkgs
                          C:UsersAdmin.condapkgs
                          C:UsersAdminAppDataLocalcondacondapkgs
       envs directories : C:UsersAdminAnaconda3envs
                          C:UsersAdmin.condaenvs
                          C:UsersAdminAppDataLocalcondacondaenvs
               platform : win-64
             user-agent : conda/4.7.5 requests/2.22.0 CPython/3.7.3 Windows/10 Windows/10.0.18362
          administrator : True
             netrc file : None
           offline mode : False


C:WINDOWSsystem32>conda list
# packages in environment at C:UsersAdminAnaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0                    py37_0
_tflow_select             2.1.0                       gpu    anaconda
absl-py                   0.7.1                    py37_0    conda-forge
anaconda-client           1.7.2                      py_0    conda-forge
anaconda-navigator        1.9.7                    py37_0
asn1crypto                0.24.0                py37_1003    conda-forge
astor                     0.7.1                      py_0    conda-forge
attrs                     19.1.0                     py_0    conda-forge
babel                     2.7.0                      py_0    conda-forge
backcall                  0.1.0                      py_0    conda-forge
beautifulsoup4            4.7.1                 py37_1001    conda-forge
blas                      1.0                         mkl
bleach                    3.1.0                      py_0    conda-forge
blinker                   1.4                        py_1    conda-forge
boto                      2.49.0                     py_0    conda-forge
boto3                     1.9.180                    py_0    conda-forge
botocore                  1.12.180                   py_0    conda-forge
bz2file                   0.98                       py_0    conda-forge
bzip2                     1.0.6             hfa6e2cd_1002    conda-forge
ca-certificates           2019.6.16            hecc5488_0    conda-forge
catboost                  0.15.2                   py37_0    conda-forge
certifi                   2019.6.16                py37_0    conda-forge
cffi                      1.12.3           py37hb32ad35_0    conda-forge
chardet                   3.0.4                 py37_1003    conda-forge
click                     7.0                        py_0    conda-forge
clyent                    1.2.2                      py_1    conda-forge
colorama                  0.4.1                      py_0    conda-forge
conda                     4.7.5                    py37_0    conda-forge
conda-build               3.18.6                   py37_0    conda-forge
conda-env                 2.6.0                         1    conda-forge
conda-package-handling    1.3.10                   py37_0    conda-forge
conda-verify              3.1.1                 py37_1000    conda-forge
contractions              0.0.18                   pypi_0    pypi
cryptography              2.7              py37hb32ad35_0    conda-forge
cudatoolkit               10.0.130                      0    anaconda
cudnn                     7.6.0                cuda10.0_0    anaconda
cycler                    0.10.0                     py_1    conda-forge
decorator                 4.4.0                      py_0    conda-forge
deepreplay                0.1.2a2                  pypi_0    pypi
defusedxml                0.5.0                      py_1    conda-forge
docutils                  0.14                  py37_1001    conda-forge
entrypoints               0.3                   py37_1000    conda-forge
filelock                  3.0.10                     py_0    conda-forge
flashtext                 2.7                      pypi_0    pypi
freetype                  2.10.0               h5db478b_0    conda-forge
future                    0.17.1                py37_1000    conda-forge
gast                      0.2.2                      py_0    conda-forge
gensim                    3.7.1            py37h6538335_1    conda-forge
glob2                     0.7                        py_0    conda-forge
grpcio                    1.16.1           py37h351948d_1
h5py                      2.9.0           nompi_py37h3cb27cb_1102    conda-forge
hdf5                      1.10.4          nompi_hcc15c50_1106    conda-forge
hyperas                   0.4.1                    pypi_0    pypi
hyperopt                  0.1.2                      py_0    conda-forge
icc_rt                    2019.0.0             h0cc432a_1
icu                       58.2                 ha66f8fd_1
idna                      2.8                   py37_1000    conda-forge
intel-openmp              2019.4                      245
ipykernel                 5.1.1            py37h39e3cac_0    conda-forge
ipython                   7.6.0            py37h5ca1d4c_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.4.2                      py_0    conda-forge
jedi                      0.14.0                   py37_0    conda-forge
jinja2                    2.10.1                     py_0    conda-forge
jmespath                  0.9.4                      py_0    conda-forge
joblib                    0.13.2                     py_0    conda-forge
jpeg                      9c                hfa6e2cd_1001    conda-forge
json5                     0.8.4                      py_0    conda-forge
jsonschema                3.0.1                    py37_0    conda-forge
jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            5.2.4                      py_3    conda-forge
jupyter_console           6.0.0                      py_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyterlab                1.0.0                    py37_0    conda-forge
jupyterlab_server         1.0.0                      py_0    conda-forge
keras                     2.2.4                    py37_1    conda-forge
keras-applications        1.0.7                      py_1    conda-forge
keras-preprocessing       1.0.9                      py_1    conda-forge
kiwisolver                1.1.0            py37he980bc4_0    conda-forge
libarchive                3.3.3             h4890af2_1005    conda-forge
libblas                   3.8.0                     8_mkl    conda-forge
libcblas                  3.8.0                     8_mkl    conda-forge
libgpuarray               0.7.6             hfa6e2cd_1003    conda-forge
libiconv                  1.15              hfa6e2cd_1005    conda-forge
liblapack                 3.8.0                     8_mkl    conda-forge
liblapacke                3.8.0                     8_mkl    conda-forge
liblief                   0.9.0                ha925a31_2
libpng                    1.6.37               h7602738_0    conda-forge
libprotobuf               3.8.0                h1a1b453_0    conda-forge
libsodium                 1.0.16            h2fa13f4_1001    conda-forge
libtiff                   4.0.10            h6512ee2_1003    conda-forge
libwebp                   1.0.2                hfa6e2cd_2    conda-forge
libxml2                   2.9.9                h9ce36c8_0    conda-forge
lightgbm                  2.2.3            py37h6538335_0    conda-forge
lz4-c                     1.8.3             he025d50_1001    conda-forge
lzo                       2.10              hfa6e2cd_1000    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6
m2w64-gcc-libs            5.3.0                         7
m2w64-gcc-libs-core       5.3.0                         7
m2w64-gmp                 6.1.0                         2
m2w64-libwinpthread-git   5.0.0.4634.697f757               2
mako                      1.0.10                     py_0    conda-forge
markdown                  2.6.11                     py_0    conda-forge
markupsafe                1.1.1            py37hfa6e2cd_0    conda-forge
matplotlib                3.1.0                    py37_1    conda-forge
matplotlib-base           3.1.0            py37h2852a4a_1    conda-forge
menuinst                  1.4.16                   py37_0    conda-forge
missingno                 0.4.1                      py_0    conda-forge
mistune                   0.8.4           py37hfa6e2cd_1000    conda-forge
mkl                       2019.4                      245
mlxtend                   0.16.0                     py_0    conda-forge
msys2-conda-epoch         20160418                      1
navigator-updater         0.2.1                    py37_0
nbconvert                 5.5.0                      py_0    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
nbopen                    0.6                      pypi_0    pypi
networkx                  2.3                        py_0    conda-forge
nltk                      3.2.5                      py_0    conda-forge
notebook                  5.7.8                    py37_1    conda-forge
numpy                     1.16.4           py37hc71023c_0    conda-forge
oauthlib                  3.0.1                      py_0    conda-forge
olefile                   0.46                       py_0    conda-forge
opencv                    4.1.0            py37hb4945ee_5    conda-forge
openssl                   1.1.1b               hfa6e2cd_2    conda-forge
pandas                    0.24.2           py37he350917_0    conda-forge
pandoc                    2.7.3                         0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.5.0                      py_0    conda-forge
patsy                     0.5.1                      py_0    conda-forge
pickleshare               0.7.5                 py37_1000    conda-forge
pillow                    6.0.0            py37h9a613e6_0    conda-forge
pip                       19.1.1                   py37_0    conda-forge
pkginfo                   1.5.0.1                    py_0    conda-forge
prometheus_client         0.7.1                      py_0    conda-forge
prompt_toolkit            2.0.9                      py_0    conda-forge
protobuf                  3.8.0            py37he025d50_1    conda-forge
psutil                    5.6.3            py37hfa6e2cd_0    conda-forge
py-lief                   0.9.0            py37ha925a31_2
pycosat                   0.6.3           py37hfa6e2cd_1001    conda-forge
pycparser                 2.19                     py37_1    conda-forge
pygments                  2.4.2                      py_0    conda-forge
pygpu                     0.7.6           py37h452e1ab_1000    conda-forge
pyjwt                     1.7.1                      py_0    conda-forge
pymongo                   3.8.0            py37h6538335_0    conda-forge
pyopenssl                 19.0.0                   py37_0    conda-forge
pyparsing                 2.4.0                      py_0    conda-forge
pyqt                      5.9.2            py37h6538335_0    conda-forge
pyreadline                2.1                   py37_1000    conda-forge
pyrsistent                0.15.2           py37hfa6e2cd_0    conda-forge
pysocks                   1.7.0                    py37_0    conda-forge
python                    3.7.3                hb12ca83_0    conda-forge
python-crfsuite           0.9.6           py37he980bc4_1000    conda-forge
python-dateutil           2.8.0                      py_0    conda-forge
python-libarchive-c       2.8                   py37_1004    conda-forge
pytz                      2019.1                     py_0    conda-forge
pywin32                   224             py37hfa6e2cd_1000    conda-forge
pywinpty                  0.5.5                 py37_1000    conda-forge
pyyaml                    5.1.1            py37hfa6e2cd_0    conda-forge
pyzmq                     18.0.2           py37he7828b0_0    conda-forge
qt                        5.9.7            vc14h73c81de_0  [vc14]  anaconda
qtconsole                 4.5.1                      py_0    conda-forge
qtpy                      1.8.0                      py_0    conda-forge
requests                  2.22.0                   py37_0    conda-forge
requests-oauthlib         1.2.0                      py_0    conda-forge
ruamel_yaml               0.15.71         py37hfa6e2cd_1000    conda-forge
s3transfer                0.2.1                    py37_0    conda-forge
scikit-learn              0.21.2           py37h7208079_1    conda-forge
scipy                     1.2.1            py37h29ff71c_0
seaborn                   0.9.0                      py_1    conda-forge
send2trash                1.5.0                      py_0    conda-forge
setuptools                41.0.1                   py37_0    conda-forge
sip                       4.19.8          py37h6538335_1000    conda-forge
six                       1.12.0                py37_1000    conda-forge
smart_open                1.8.4                      py_0    conda-forge
soupsieve                 1.9.2                    py37_0    conda-forge
sqlite                    3.28.0               hfa6e2cd_0    conda-forge
statsmodels               0.10.0           py37hfa6e2cd_0    conda-forge
tensorboard               1.13.1                   py37_0    conda-forge
tensorflow                1.13.1          gpu_py37h83e5d6a_0    anaconda
tensorflow-base           1.13.1          gpu_py37h871c8ca_0    anaconda
tensorflow-estimator      1.13.0           py37h39e3cac_0    conda-forge
tensorflow-gpu            1.13.1               h0d30ee6_0    anaconda
termcolor                 1.1.0                      py_2    conda-forge
terminado                 0.8.2                    py37_0    conda-forge
testpath                  0.4.2                   py_1001    conda-forge
textblob                  0.15.3                     py_0    conda-forge
theano                    1.0.4           py37h6538335_1000    conda-forge
tk                        8.6.9             hfa6e2cd_1002    conda-forge
tornado                   6.0.3            py37hfa6e2cd_0    conda-forge
tqdm                      4.32.2                     py_0    conda-forge
traitlets                 4.3.2                 py37_1000    conda-forge
twython                   3.7.0                      py_0    conda-forge
urllib3                   1.24.3                   py37_0    conda-forge
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.15.26706          h3a45250_4
vs2015_win-64             14.0.25420          h55c1224_11
wcwidth                   0.1.7                      py_1    conda-forge
webencodings              0.5.1                      py_1    conda-forge
werkzeug                  0.15.4                     py_0    conda-forge
wheel                     0.33.4                   py37_0    conda-forge
widgetsnbextension        3.4.2                 py37_1000    conda-forge
win_inet_pton             1.1.0                    py37_0    conda-forge
wincertstore              0.2                   py37_1002    conda-forge
winpty                    0.4.3                         4    conda-forge
wordcloud                 1.5.0           py37hfa6e2cd_1000    conda-forge
xgboost                   0.90                     pypi_0    pypi
xz                        5.2.4             h2fa13f4_1001    conda-forge
yaml                      0.1.7             hfa6e2cd_1001    conda-forge
zeromq                    4.3.1             he025d50_1000    conda-forge
zlib                      1.2.11            h2fa13f4_1004    conda-forge
zstd                      1.4.0                hd8a0e53_0    conda-forge


解决方案

conda 找到了几种升级环境的方法.屏幕截图中的输出被截断,但看起来它可以从不同的渠道中选择多个包(tensorflow-base、cudatoolkit...)的相同版本.

conda found several ways in which to upgrade your environment. The output in your screenshot is truncated, but it looks like it can pick the same versions of several packages (tensorflow-base, cudatoolkit,...) from different channels.

尝试强制执行严格的频道优先级:

Try to enforce strict channel priority:

conda update --strict-channel-priority --all

如果没有帮助,请从特定渠道显式安装一个或多个这些软件包,这样 conda 就不必再决定是从 anaconda:: 还是从 默认值::.

If that doesn't help, install one or more of those packages explicitly from a particular channel, so that conda no longer has to decide whether to take it from anaconda:: or from defaults::.

相关文章