conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
152 stars 183 forks source link

Missing auxlib.packaging #1903

Open rhc54 opened 7 months ago

rhc54 commented 7 months ago

Solution to issue cannot be found in the documentation.

Issue

I installed conda, and then did:

$ conda install -n root -c conda-forge conda-smithy

which completed without error. However, when I try to run smithy, I keep hitting the following error:

$ conda smithy ci-skeleton pmix
Traceback (most recent call last):
  File "/opt/anaconda3/bin/conda-smithy", line 6, in <module>
    from conda_smithy.cli import main
  File "/opt/anaconda3/lib/python3.11/site-packages/conda_smithy/cli.py", line 13, in <module>
    import conda_build.api
  File "/opt/anaconda3/lib/python3.11/site-packages/conda_build/api.py", line 21, in <module>
    from .config import DEFAULT_PREFIX_LENGTH as _prefix_length
  File "/opt/anaconda3/lib/python3.11/site-packages/conda_build/config.py", line 18, in <module>
    from .conda_interface import (
  File "/opt/anaconda3/lib/python3.11/site-packages/conda_build/conda_interface.py", line 11, in <module>
    from conda.auxlib.packaging import (  # noqa: F401
ModuleNotFoundError: No module named 'conda.auxlib.packaging'

Doesn't matter what smithy command I use - always the same error. I have been unable to find anywhere that I can install the missing package.

Probably something dumb I've done, but I could use a pointer!

Installed packages

$ conda list
# packages in environment at /opt/anaconda3/envs/condaenv:
#
# Name                    Version                   Build  Channel

Environment info

$ conda info

     active environment : condaenv
    active env location : /opt/anaconda3/envs/condaenv
            shell level : 2
       user config file : /Users/rhc/.condarc
 populated config files : /Users/rhc/.condarc
          conda version : 24.3.0
    conda-build version : 24.1.2
         python version : 3.11.8.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.3.0=0
                          __osx=14.4.1=0
                          __unix=0=0
       base environment : /opt/anaconda3  (writable)
      conda av data dir : /opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/anaconda3/pkgs
                          /Users/rhc/.conda/pkgs
       envs directories : /opt/anaconda3/envs
                          /Users/rhc/.conda/envs
               platform : osx-arm64
             user-agent : conda/24.3.0 requests/2.31.0 CPython/3.11.8 Darwin/23.4.0 OSX/14.4.1 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.6 aau/0.4.3 c/2x41voVhcC66KadZBRxqAA s/6BVZkSimYMg4Dn-tQ7yIVg e/VxtgPFvXHwT-UZjwZjJ5Jg
                UID:GID : 501:20
             netrc file : None
           offline mode : False
tm-slavik57 commented 3 months ago

We have a similar issue when using conda 24.7.1 which started this weekend in our CI pipeline. It started without any change to the code, the pipeline worked on Thursday on a PR and now it stopped working on the same PR on top of the same main branch. Any news on this?


Edit: Updating the conda-build package from 3.28.4 to the latest version 24.7.1 solved the issue for us. Still weird it started happening all of a sudden

KrisThielemans commented 6 days ago

Same problem for me on Ubuntu 22.04, conda update --all did not help.

The module is not there:

$ ls /home/kris/miniconda3/envs/stircondaforge/lib/python3.12/site-packages/conda/auxlib
LICENSE  __init__.py  __pycache__  collection.py  compat.py  decorators.py  entity.py  exceptions.py  ish.py  logz.py  type_coercion.py

As I'm getting warnings about the defaults channel, and I read https://conda-forge.org/docs/user/transitioning_from_defaults/ and saw that I had packages from the defaults channel

$ conda list --show-channel-urls|grep conda
conda                     24.9.2          py312h06a4308_0    defaults
conda-build               24.9.0          py312h06a4308_0    defaults
conda-forge-pinning       2024.11.20.13.33.43      hd8ed1ab_0    conda-forge
conda-index               0.5.0           py312h06a4308_0    defaults
conda-libmamba-solver     24.9.0             pyhd3eb1b0_0    defaults
conda-package-handling    2.4.0           py312h06a4308_0    defaults
conda-package-streaming   0.11.0          py312h06a4308_0    defaults
conda-smithy              3.44.7          unix_pyhd81877a_0    conda-forge

So, I followed those instructions to remove defaults channel, and after another update --all, I have

conda                     24.9.2          py312h7900ff3_0    conda-forge
conda-build               24.9.0          py312h7900ff3_0    conda-forge
conda-forge-pinning       2024.11.20.13.33.43      hd8ed1ab_0    conda-forge
conda-index               0.5.0              pyhd8ed1ab_0    conda-forge
conda-libmamba-solver     24.9.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.4.0              pyh7900ff3_0    conda-forge
conda-package-streaming   0.11.0             pyhd8ed1ab_0    conda-forge
conda-smithy              3.44.7          unix_pyhd81877a_0    conda-forge

But that still didn't help.