[Python] Conda environment does not isolate each environment

Discussão em 'Python' iniciado por Stack, Março 22, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to install some packages upon newly created conda environment. But weirdly it is already full of packages, which have been used in other previous conda environments. For example, I noticed var conda environment already share the packages with other environments although I never asked to - I used conda create --name var -y python=3.10 command:

    (base) XXX@XXX-XXX:/home/nas/XXX/B/C$ conda activate var
    (var) XXX@XXX-XXX:/home/nas/XXX/B/C$ pip freeze
    absl-py==2.1.0
    av==14.2.0
    certifi==2025.1.31
    charset-normalizer==3.4.1
    chumpy==0.70
    cmake==3.31.6
    contourpy==1.2.1
    cycler==0.12.1
    dearpygui==1.7.1
    diff_gaussian_rasterization @ file:///home/nas/XXX/B/D/submodules/diff-gaussian-rasterization
    ...


    , which means conda environments are not isolated and mixed to each other, therefore jointly affected whenever I update the package version in each environment.

    One suspicious part is SafetyError: The package for libstdcxx-ng located at /home/nas/XXX/anaconda3/pkgs/libstdcxx-ng-11.2.0-h1234567_1 appears to be corrupted. The path 'lib/libstdc++.so.6.0.29' has an incorrect size.which is shown below of the following messages:

    (base) XXX@XXX-XXX:/home/nas/XXX/B/C$ conda create --name var -y python=3.10
    Collecting package metadata (current_repodata.json): done
    Solving environment: done


    ==> WARNING: A newer version of conda exists. <==
    current version: 22.9.0
    latest version: 25.3.0

    Please update conda by running

    $ conda update -n base -c defaults conda



    ## Package Plan ##

    environment location: /home/nas4/XXX/anaconda3/envs/var

    added / updated specs:
    - python=3.10


    The following NEW packages will be INSTALLED:

    _libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main None
    _openmp_mutex pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu None
    bzip2 pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_6 None
    ca-certificates pkgs/main/linux-64::ca-certificates-2025.2.25-h06a4308_0 None
    ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.40-h12ee557_0 None
    libffi pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 None
    libgcc-ng pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1 None
    libgomp pkgs/main/linux-64::libgomp-11.2.0-h1234567_1 None
    libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1 None
    libuuid pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 None
    ncurses pkgs/main/linux-64::ncurses-6.4-h6a678d5_0 None
    openssl pkgs/main/linux-64::eek:penssl-3.0.16-h5eee18b_0 None
    pip pkgs/main/linux-64::pip-25.0-py310h06a4308_0 None
    python pkgs/main/linux-64::python-3.10.16-he870216_1 None
    readline pkgs/main/linux-64::readline-8.2-h5eee18b_0 None
    setuptools pkgs/main/linux-64::setuptools-75.8.0-py310h06a4308_0 None
    sqlite pkgs/main/linux-64::sqlite-3.45.3-h5eee18b_0 None
    tk pkgs/main/linux-64::tk-8.6.14-h39e8969_0 None
    tzdata pkgs/main/noarch::tzdata-2025a-h04d1e81_0 None
    wheel pkgs/main/linux-64::wheel-0.45.1-py310h06a4308_0 None
    xz pkgs/main/linux-64::xz-5.6.4-h5eee18b_1 None
    zlib pkgs/main/linux-64::zlib-1.2.13-h5eee18b_1 None


    Preparing transaction: done
    Verifying transaction: |
    SafetyError: The package for libstdcxx-ng located at /home/nas/XXX/anaconda3/pkgs/libstdcxx-ng-11.2.0-h1234567_1
    appears to be corrupted. The path 'lib/libstdc++.so.6.0.29'
    has an incorrect size.
    reported size: 17981480 bytes
    actual size: 1594864 bytes


    done
    Executing transaction: done
    #
    # To activate this environment, use
    #
    # $ conda activate var
    #
    # To deactivate an active environment, use
    #
    # $ conda deactivate


    I somewhat have a hint about the message since that file is affected by conda install -c "nvidia/label/cuda-11.7.1" cuda-toolkit ninja (which I used) as far as I know. Still I have no idea about whether it is related to my entangled environments problem and why it occurs.

    Continue reading...

Compartilhe esta Página