Anaconda 4.7.5-有关conda build<3.18.3和python包问题的警告

2024-04-20 10:33:37 发布

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

我在Ubuntu Linux 18.04lts x64上运行Anaconda python发行版,并用通常的conda update --all更新了发行版。之后,命令行消息建议更新conda基本默认值。出于某种原因,我现在有几个问题。首先,我无法启动jupyter lab,即使在尝试重新安装conda install jupyter之后。第二,我收到了新的警告信息。

    WARNING conda.base.context:use_only_tar_bz2(632):
 Conda is constrained to only using the old .tar.bz2
 file format because you have conda-build installed,
 and it is <3.18.3.  Update or remove conda-build to
 get smaller downloads and faster extractions.

所以我从今天开始找这个blog post 关于让水蟒更快。但该帖子似乎是更多的信息,似乎不建议立即升级。

这是conda info的输出。

     active environment : XXX
    active env location : XXX
            shell level : 2
       user config file : ../.condarc
 populated config files : ../.condarc
          conda version : 4.7.5
    conda-build version : 3.17.8
         python version : 3.6.6.final.0
       virtual packages : __cuda=10.1
       base environment : ../anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : ../.conda/pkgs
       envs directories : ../.conda/envs
               platform : linux-64
             user-agent : conda/4.7.5 requests/2.22.0 CPython/3.6.6 Linux/4.15.0-50-generic ubuntu/18.04.2 glibc/2.27
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

还有人碰到这个问题吗?我应该删除我以前的anaconda发行版,下载并安装新版本的4.7,还是有一个更简单的补丁?

更新

所以我把这个问题发到了Github上的condarepo上。下面列出了针对此问题打开的当前问题。根据msarahan这里是问题的基础,只是一个临时的解决方法

https://github.com/conda/conda/issues/8842

  1. anaconda is a meta-package. Each version consists of a set of versions that have all gone through QA together as a set. If you change any version of any package in that collection, you no longer have that metapackage, because you have strayed from that known set. There is a special version of that metapackage, custom, that is meant to handle this relaxation of constraints. The "custom" version depends only on a particular version of python - it removes the constraints on all other packages.

  2. conda 4.7 builds up its candidates for addition differently from earlier conda versions. It starts with specs from the history, and tries to constrain things where it can, to speed up the solution. When conda finds the anaconda metapackage with the "custom" version, it keeps it, but all of those other dependencies are now orphaned. This is why conda is removing them - they have no spec in the history that tells conda to keep them.

You can restore these by running conda install --only-deps anaconda. From then on, all of those packages are considered part of your explicit history, and you won't have further problems like this.


Tags: ofthetohttpscomyouthatis
3条回答
conda activate base  # or just conda deactivate
conda update conda-build

(或者只是conda update -n base -c defaults conda-build

如果无法修复,请按照@LeninGF的建议,在更新到4.7.5之前尝试回滚到,然后删除conda元数据,清理conda,然后再次尝试更新,即

conda list --revisions  # find number, x, before the update
conda install --revision x
rm -rf ~/.conda
conda clean --all
conda update conda
conda update conda-build

输出:

The following packages will be UPDATED:
conda-build                                 3.17.8-py37_0 --> 3.18.5-py37_0

conda info命令的输出(conda构建已从3.17.8更新):

     active environment : None
       user config file : /Users/<user>/.condarc
 populated config files : /Users/<user>/.condarc
          conda version : 4.7.5
    conda-build version : 3.18.5
         python version : 3.7.3.final.0
       virtual packages : 
       base environment : /Users/<user>/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/<user>/anaconda3/pkgs
                          /Users/<user>/.conda/pkgs
       envs directories : /Users/<user>/anaconda3/envs
                          /Users/<user>/.conda/envs
               platform : osx-64
             user-agent : conda/4.7.5 requests/2.21.0 CPython/3.7.3 Darwin/18.5.0 OSX/10.14.4
                UID:GID : 501:20
             netrc file : /Users/<user>/.netrc
           offline mode : False

我只是在更新时遇到了同样的问题。以下内容帮助我恢复基本环境。我正在另一个环境中测试,看看它是否有效。

conda list --revisions
conda install --revision  dd

其中dd是要返回到的修订号

例如:

conda install --revision 8

这帮助我恢复了我的基地康达环境。不幸的是,对于我创建的tensorflow环境,我不得不重新安装。建议您在环境正常工作后创建一个yaml文件,以便可以随时重新安装。这已经结束了

conda env export > name.yaml

您需要激活anaconda环境才能正常工作,并指向磁盘中要存储文件的位置。

要从yaml文件创建环境,只需使用:

conda env create -f name.yaml

为了方便起见,我在这里附上了tensorflow gpu环境的结果(您可以看到我有多达11个修订版)。不是conda方面的专家,但似乎修订工作就像git一样,记录您的更改并让您返回到它们。不过,这似乎还取决于是否有conda环境中安装的备份文件,在运行conda clean命令时,这些文件可能会丢失:

(base) leninml@Lenin:~$ conda activate tf_gpu_10
(tf_gpu_10) leninml@Lenin:~$ conda list --revisions
2019-06-26 12:50:10  (rev 0)

2019-06-26 12:59:19  (rev 1)
    +_tflow_select-2.1.0 (anaconda)
    +absl-py-0.7.1 (anaconda)
    +astor-0.7.1 (anaconda)
    +blas-1.0 (anaconda)
    +c-ares-1.15.0 (anaconda)
    +ca-certificates-2019.5.15 (anaconda)
    +certifi-2019.6.16 (anaconda)
    +cudatoolkit-10.0.130 (anaconda)
    +cudnn-7.6.0 (anaconda)
    +cupti-10.0.130 (anaconda)
    +gast-0.2.2 (anaconda)
    +grpcio-1.16.1 (anaconda)
    +h5py-2.9.0 (anaconda)
    +hdf5-1.10.4 (anaconda)
    +intel-openmp-2019.4 (anaconda)
    +keras-applications-1.0.8 (anaconda)
    +keras-preprocessing-1.1.0 (anaconda)
    +libedit-3.1.20181209 (anaconda)
    +libffi-3.2.1 (anaconda)
    +libgcc-ng-9.1.0 (anaconda)
    +libgfortran-ng-7.3.0 (anaconda)
    +libprotobuf-3.8.0 (anaconda)
    +libstdcxx-ng-9.1.0 (anaconda)
    +markdown-3.1.1 (anaconda)
    +mkl-2019.4 (anaconda)
    +mkl_fft-1.0.12 (anaconda)
    +mkl_random-1.0.2 (anaconda)
    +mock-3.0.5 (anaconda)
    +ncurses-6.1 (anaconda)
    +numpy-1.16.4 (anaconda)
    +numpy-base-1.16.4 (anaconda)
    +openssl-1.1.1 (anaconda)
    +pip-19.1.1 (anaconda)
    +protobuf-3.8.0 (anaconda)
    +python-3.7.3 (anaconda)
    +readline-7.0 (anaconda)
    +scipy-1.2.1 (anaconda)
    +setuptools-41.0.1 (anaconda)
    +six-1.12.0 (anaconda)
    +sqlite-3.28.0 (anaconda)
    +tensorboard-1.13.1 (anaconda)
    +tensorflow-1.13.1 (anaconda)
    +tensorflow-base-1.13.1 (anaconda)
    +tensorflow-estimator-1.13.0 (anaconda)
    +tensorflow-gpu-1.13.1 (anaconda)
    +termcolor-1.1.0 (anaconda)
    +tk-8.6.8 (anaconda)
    +werkzeug-0.15.4 (anaconda)
    +wheel-0.33.4 (anaconda)
    +xz-5.2.4 (anaconda)
    +zlib-1.2.11 (anaconda)

2019-06-26 13:00:52  (rev 2)
    +backcall-0.1.0 (anaconda)
    +decorator-4.4.0 (anaconda)
    +ipython-7.5.0 (anaconda)
    +ipython_genutils-0.2.0 (anaconda)
    +jedi-0.13.3 (anaconda)
    +parso-0.4.0 (anaconda)
    +pexpect-4.7.0 (anaconda)
    +pickleshare-0.7.5 (anaconda)
    +prompt_toolkit-2.0.9 (anaconda)
    +ptyprocess-0.6.0 (anaconda)
    +pygments-2.4.2 (anaconda)
    +traitlets-4.3.2 (anaconda)
    +wcwidth-0.1.7 (anaconda)

2019-06-26 13:05:42  (rev 3)
     blas  {1.0 (anaconda) -> 2.7 (conda-forge)}
     ca-certificates  {2019.5.15 (anaconda) -> 2019.6.16 (conda-forge)}
     certifi  {2019.6.16 (anaconda) -> 2019.6.16 (conda-forge)}
     grpcio  {1.16.1 (anaconda) -> 1.16.1}
     mkl_fft  {1.0.12 (anaconda) -> 1.0.13 (conda-forge)}
     mkl_random  {1.0.2 (anaconda) -> 1.0.4 (conda-forge)}
     numpy  {1.16.4 (anaconda) -> 1.16.4}
     numpy-base  {1.16.4 (anaconda) -> 1.16.4}
     openssl  {1.1.1 (anaconda) -> 1.1.1b (conda-forge)}
     scipy  {1.2.1 (anaconda) -> 1.3.0 (conda-forge)}
    +joblib-0.13.2 (conda-forge)
    +libblas-3.8.0 (conda-forge)
    +libcblas-3.8.0 (conda-forge)
    +liblapack-3.8.0 (conda-forge)
    +liblapacke-3.8.0 (conda-forge)
    +libopenblas-0.3.6
    +openblas-0.3.5 (conda-forge)
    +scikit-learn-0.21.2 (conda-forge)

2019-06-26 13:08:05  (rev 4)
     tk  {8.6.8 (anaconda) -> 8.6.9 (conda-forge)}
    +cycler-0.10.0 (conda-forge)
    +dbus-1.13.6 (conda-forge)
    +expat-2.2.5 (conda-forge)
    +fontconfig-2.13.1 (conda-forge)
    +freetype-2.10.0 (conda-forge)
    +gettext-0.19.8.1 (conda-forge)
    +glib-2.58.3 (conda-forge)
    +gst-plugins-base-1.14.5 (conda-forge)
    +gstreamer-1.14.5 (conda-forge)
    +icu-58.2 (conda-forge)
    +jpeg-9c (conda-forge)
    +kiwisolver-1.1.0 (conda-forge)
    +libiconv-1.15 (conda-forge)
    +libpng-1.6.37 (conda-forge)
    +libuuid-2.32.1 (conda-forge)
    +libxcb-1.13 (conda-forge)
    +libxml2-2.9.9 (conda-forge)
    +matplotlib-3.1.0 (conda-forge)
    +matplotlib-base-3.1.0 (conda-forge)
    +pcre-8.41 (conda-forge)
    +pthread-stubs-0.4 (conda-forge)
    +pyparsing-2.4.0 (conda-forge)
    +pyqt-5.9.2 (conda-forge)
    +python-dateutil-2.8.0 (conda-forge)
    +qt-5.9.7 (conda-forge)
    +sip-4.19.8 (conda-forge)
    +tornado-6.0.3 (conda-forge)
    +xorg-libxau-1.0.9 (conda-forge)
    +xorg-libxdmcp-1.1.3 (conda-forge)

2019-06-26 13:10:31  (rev 5)
     ca-certificates  {2019.6.16 (conda-forge) -> 2019.5.15 (anaconda)}
     certifi  {2019.6.16 (conda-forge) -> 2019.6.16 (anaconda)}
     openssl  {1.1.1b (conda-forge) -> 1.1.1 (anaconda)}
    +cloudpickle-1.1.1 (anaconda)
    +cytoolz-0.9.0.1 (anaconda)
    +dask-core-1.2.2 (anaconda)
    +imageio-2.5.0 (anaconda)
    +libtiff-4.0.10 (anaconda)
    +networkx-2.3 (anaconda)
    +olefile-0.46 (anaconda)
    +pillow-6.0.0 (anaconda)
    +pywavelets-1.0.3 (anaconda)
    +scikit-image-0.15.0 (anaconda)
    +toolz-0.9.0 (anaconda)
    +zstd-1.3.7 (anaconda)

2019-06-26 13:12:14  (rev 6)
     ca-certificates  {2019.5.15 (anaconda) -> 2019.6.16 (conda-forge)}
     certifi  {2019.6.16 (anaconda) -> 2019.6.16 (conda-forge)}
     openssl  {1.1.1 (anaconda) -> 1.1.1b (conda-forge)}
    +tensorflow-hub-0.5.0 (conda-forge)

2019-06-26 13:13:00  (rev 7)
     tensorboard  {1.13.1 (anaconda) -> 1.13.1 (conda-forge)}

2019-06-26 13:13:47  (rev 8)
     ca-certificates  {2019.6.16 (conda-forge) -> 2019.5.15 (anaconda)}
     certifi  {2019.6.16 (conda-forge) -> 2019.6.16 (anaconda)}
     openssl  {1.1.1b (conda-forge) -> 1.1.1 (anaconda)}
    +pandas-0.24.2 (anaconda)
    +pytz-2019.1 (anaconda)

2019-06-26 13:14:36  (rev 9)
     ca-certificates  {2019.5.15 (anaconda) -> 2019.6.16 (conda-forge)}
     certifi  {2019.6.16 (anaconda) -> 2019.6.16 (conda-forge)}
     openssl  {1.1.1 (anaconda) -> 1.1.1b (conda-forge)}
    +pydicom-1.2.2 (conda-forge)

2019-06-26 13:19:06  (rev 10)
     ca-certificates  {2019.6.16 (conda-forge) -> 2019.5.15 (anaconda)}
     certifi  {2019.6.16 (conda-forge) -> 2019.6.16 (anaconda)}
     openssl  {1.1.1b (conda-forge) -> 1.1.1 (anaconda)}
    +attrs-19.1.0 (anaconda)
    +bleach-3.1.0 (anaconda)
    +defusedxml-0.6.0 (anaconda)
    +entrypoints-0.3 (anaconda)
    +gmp-6.1.2 (anaconda)
    +ipykernel-5.1.1 (anaconda)
    +ipywidgets-7.4.2 (anaconda)
    +jinja2-2.10.1 (anaconda)
    +jsonschema-3.0.1 (anaconda)
    +jupyter-1.0.0 (anaconda)
    +jupyter_client-5.2.4 (anaconda)
    +jupyter_console-6.0.0 (anaconda)
    +jupyter_core-4.4.0 (anaconda)
    +libsodium-1.0.16 (anaconda)
    +markupsafe-1.1.1 (anaconda)
    +mistune-0.8.4 (anaconda)
    +nbconvert-5.5.0 (anaconda)
    +nbformat-4.4.0 (anaconda)
    +notebook-5.7.8 (anaconda)
    +pandoc-2.2.3.2 (anaconda)
    +pandocfilters-1.4.2 (anaconda)
    +prometheus_client-0.6.0 (anaconda)
    +pyrsistent-0.14.11 (anaconda)
    +pyzmq-18.0.0 (anaconda)
    +qtconsole-4.5.1 (anaconda)
    +send2trash-1.5.0 (anaconda)
    +terminado-0.8.2 (anaconda)
    +testpath-0.4.2 (anaconda)
    +webencodings-0.5.1 (anaconda)
    +widgetsnbextension-3.4.2 (anaconda)
    +zeromq-4.3.1 (anaconda)

2019-06-26 13:33:00  (rev 11)
     ca-certificates  {2019.5.15 (anaconda) -> 2019.6.16 (conda-forge)}
     certifi  {2019.6.16 (anaconda) -> 2019.6.16 (conda-forge)}
     openssl  {1.1.1 (anaconda) -> 1.1.1b (conda-forge)}
    +binutils_impl_linux-64-2.31.1
    +binutils_linux-64-2.31.1
    +gcc_impl_linux-64-7.3.0 (conda-forge)
    +gcc_linux-64-7.3.0 (conda-forge)
    +gxx_impl_linux-64-7.3.0 (conda-forge)
    +gxx_linux-64-7.3.0 (conda-forge)
    +keras-2.2.4 (conda-forge)
    +libgpuarray-0.7.6 (conda-forge)
    +mako-1.0.10 (conda-forge)
    +pygpu-0.7.6 (conda-forge)
    +pyyaml-5.1.1 (conda-forge)
    +theano-1.0.4 (conda-forge)
    +yaml-0.1.7 (conda-forge)

相关问题 更多 >