Skip to content
Advertisement

Safety and Clobber errors during clone of anaconda base environment (Version 2022.05)

I installed the anaconda distribution (version 2022.05) on a windows 10 (64 bit) machine. During installation I followed the recommendations given here (installed it only for myself and didn’t add anaconda to the PATH variable). I didn’t change any setting, so you can assume a virgin anaconda with default settings.

I need to install some additional packages which aren’t part of the distribution. Hence, I wanted to create a new environment using a clone of the base environment as a starting point. However, when I tried to clone base via

conda create --clone base --name base_clone

I got weird error messages:

Source:      C:Usersjohn.smithAnaconda3
Destination: C:Usersjohn.smithAnaconda3envsbase_clone
The following packages cannot be cloned out of the root environment:
 - defaults/win-64::conda-4.12.0-py39haa95532_0
 - defaults/win-64::conda-build-3.21.8-py39haa95532_2
 - defaults/win-64::conda-env-2.6.0-haa95532_1
 - defaults/noarch::conda-token-0.3.0-pyhd3eb1b0_0
 - defaults/win-64::anaconda-2022.05-py39_0
 - defaults/win-64::anaconda-navigator-2.1.4-py39haa95532_0
 - defaults/win-64::console_shortcut-0.1.1-4
 - defaults/win-64::powershell_shortcut-0.0.1-3
Packages: 397
Files: 6
Preparing transaction: done
Verifying transaction: |
SafetyError: The package for _ipyw_jlab_nb_ext_conf located at C:Usersjohn.smithAnaconda3pkgs_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
appears to be corrupted. The path 'Scripts/jupyter-labhub-script.py'
has an incorrect size.
  reported size: 962 bytes
  actual size: 203 bytes

ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/__init__.cpython-39.pyc'

ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/ast_transforms.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/c_ast.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/c_lexer.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/c_parser.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/lextab.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/ply/__pycache__/__init__.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/ply/__pycache__/lex.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/ply/__pycache__/yacc.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/plyparser.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::pycparser-2.21-pyhd3eb1b0_0, defaults/win-64::brotlipy-0.7.0-py39h2bbff1b_1003, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/pycparser/__pycache__/yacctab.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/__pycache__/__init__.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/__pycache__/bdist_wheel.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/cli/__pycache__/__init__.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/__pycache__/macosx_libfile.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/__pycache__/metadata.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/__pycache__/pkginfo.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/__pycache__/util.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/vendored/__pycache__/__init__.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/__init__.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/_typing.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/vendored/packaging/__pycache__/tags.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::wheel-0.37.1-pyhd3eb1b0_0, defaults/win-64::win_inet_pton-1.1.0-py39haa95532_0, defaults/win-64::wrapt-1.12.1-py39h196d8e1_1, defaults/win-64::pysocks-1.7.1-py39haa95532_0, defaults/win-64::yarl-1.6.3-py39h2bbff1b_0, defaults/win-64::pynacl-1.4.0-py39hbd8134f_1, defaults/win-64::bcrypt-3.2.0-py39h196d8e1_0
  path: 'lib/site-packages/wheel/__pycache__/wheelfile.cpython-39.pyc'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/win-64::notebook-6.4.8-py39haa95532_0, defaults/win-64::notebook-6.4.8-py39haa95532_0
  path: 'menu/notebook.json'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::jupyterlab-3.3.2-pyhd3eb1b0_0, defaults/win-64::_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
  path: 'scripts/jupyter-labhub-script.py'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/noarch::jupyterlab-3.3.2-pyhd3eb1b0_0, defaults/win-64::_ipyw_jlab_nb_ext_conf-0.1.0-py39haa95532_0
  path: 'scripts/jupyter-labhub.exe'


ClobberError: This transaction has incompatible packages due to a shared path.
  packages: defaults/win-64::spyder-5.1.5-py39haa95532_1, defaults/win-64::spyder-5.1.5-py39haa95532_1
  path: 'menu/spyder_shortcut.json'



done
Executing transaction: -

    Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py


done
#
# To activate this environment, use
#
#     $ conda activate base_clone
#
# To deactivate an active environment, use
#
#     $ conda deactivate

The first part of the message (“The following packages cannot be cloned out of the root environment”) is explained in this question which could be related to the safety and clobber errors, I guess? After doing some research I found this issue which suggests that I must not clone the base environment as it is special. This is a bit confusing to me as this is, to my best knowledge, not stated anywhere in the anaconda documentation. EDIT 1: However, in anaconda navigator the “clone” button is disabled for the base environment which supports this notion.

Hence, what is the proper way of copying the base environment for my purpose?

On a side note: I tried the yml approach as well (I changed the name of the environment in the first line of the yml)

(base) PS D:19-05-2022_PythonDeployment> conda env export  --name base > base2305.yml
(base) PS D:19-05-2022_PythonDeployment> conda env create --file .base2305.yml

which yielded the same errors. I tested this on a windows 10 VM as well as a physical windows 10 installation. EDIT 2: I forgot to mention that the cloning process somewhat succeeds as there exists indeed a new environment “base_clone” after execution. However, I don’t feel comfortable ignoring the error messages during the cloning process.

Advertisement

Answer

I found a solution which results in an almost identical copy of the base environment without any error messages during the cloning process:

  1. Export the base environment to a yaml file:
conda env export  --name base > base.yml
  1. Open the yaml file. In the first line, change name of the environment in the first line name: base to any other name. In the dependencies list, remove the following nine packages:
  • anaconda=2022.05=py39_0
  • anaconda-navigator=2.1.4=py39haa95532_0
  • conda=4.12.0=py39haa95532_0
  • conda-build=3.21.8=py39haa95532_2
  • conda-env=2.6.0=haa95532_1
  • conda-token=0.3.0=pyhd3eb1b0_0
  • console_shortcut=0.1.1=4
  • powershell_shortcut=0.0.1=3
  • _ipyw_jlab_nb_ext_conf=0.1.0=py39haa95532_0

The first eight packages are mentioned by conda to be not clonable (see code section in question). The last package appears to be the offender which needs to be removed additionally.

Save the modified yaml file under a new name, e.g. base_mod.yml

  1. Use the modified yaml file to generate an environment almost identical to the base environment:
conda env create --file base_mod.yml

Conda, anaconda navigator, jupyter, … work fine with the hereby created environment as far as I can tell. It’s a bit frustrating though that such a basic functionality as cloning the (virgin) base environment required a bit of try and error to get it working.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement