Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda 4.7.5 - Warning about conda-build <3.18.3 and issues with python packages

I run the Anaconda python distribution on Ubuntu Linux 18.04 LTS x64 and just updated the distribution with the usual conda update --all. After that, the command line message suggested updating the conda base defaults. Now for some reason, I am having a couple of issues. First, I am unable to launch jupyter lab, even after trying to reinstall conda install jupyter. And second I am getting this new warning message.

    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. 

So I looked and found this blog post from today about making Anaconda faster. But the post seems to be more information and does not seem to recommend upgrading right away.

Here is the output from 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 

Has anyone else run into this issue? Should I delete my old anaconda distribution and download and install the new version of 4.7, or is there a simpler fix?

UPDATE

So I did post this issue to the conda repo on Github. The current issue open against this problem is listed below. According to msarahan here is the basis of the problem and just a temporary workaround

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.

like image 442
krishnab Avatar asked Jun 26 '19 05:06

krishnab


People also ask

Is conda and Anaconda the same in Python?

Conda is a package manager. It helps you take care of your different packages by handling installing, updating and removing them. Anaconda contains all of the most common packages (tools) a data scientist needs and can be considered the hardware store of data science tools.

Does Anaconda come with Python packages?

This will help you simplify your Python deployment and later on your package management. Anaconda comes with over a 1500 packages (including the package management system conda) and a GUI named Anaconda Navigator.

Are Conda forge packages safe?

Is Conda Forge trustworthy? Yes.

Can I use pip instead of conda?

Because Conda introduces a new packaging format, you cannot use pip and Conda interchangeably; pip cannot install the Conda package format. You can use the two tools side by side (by installing pip with conda install pip ) but they do not interoperate either.


2 Answers

conda activate base  # or just conda deactivate conda update conda-build 

(Or simply conda update -n base -c defaults conda-build)

If this doesn't fix, try rolling back to before your update to 4.7.5, as @LeninGF suggests, then removing conda metadata, cleaning up conda, then try the update again i.e.

conda list --revisions  # find number, x, before the update conda install --revision x rm -rf ~/.conda conda clean --all conda update conda 
like image 103
James Owers Avatar answered Sep 25 '22 14:09

James Owers


I just ran into the same problem by updating. The following helped me to recover base environment. I am testing in another environment to see if it works.

conda list --revisions conda install --revision  dd 

Where dd is the number of the revision you wish to go back to

For instance:

conda install --revision 8 

This helped me to recover my base conda environment. Unfortunately for the tensorflow environment I had created, I had to re-install. It is also advisable to create a yaml file of your environment once you get it working so you can reinstall anytime. This is done with

conda env export > name.yaml 

You need to activate your anaconda environment for that to work and point to a location in your disk where you want to store the file.

For creating the environment from the yaml file just use:

conda env create -f name.yaml 

In order to make it easy I attach here the result I get for my tensorflow-gpu environment (you can see I have up to 11 revisions). Not an expert on conda but it seems that revisions work as git, recording your changes and letting you go back to them. However It seems also that it depends on weather you have the back up files of installations in conda environment which probably get lost when you run conda clean command:

(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) 
like image 43
LeninGF Avatar answered Sep 21 '22 14:09

LeninGF