Conda create clone of new base fails on scikit package

Hi folks,

I’ve built a fresh install of Anaconda and was attempting to create a new environment by cloning the base. However, I get the following error message. Could somebody help me overcome this please? If I should try starting from scratch, what is the most efficient way of uninstalling and reinstalling my Anaconda?

Many thanks in advance,
Darren.

(base) C:\WINDOWS\system32>conda create --name spyder_env --clone base

Source: C:\ProgramData\anaconda3
Destination: C:\ProgramData\anaconda3\envs\spyder_env
The following packages cannot be cloned out of the root environment:

  • defaults/win-64::conda-24.5.0-py311haa95532_0
  • defaults/win-64::anaconda-anon-usage-0.4.3-py311hfc23b7f_100
  • defaults/win-64::anaconda-client-1.12.3-py311haa95532_0
  • defaults/win-64::anaconda-navigator-2.5.2-py311haa95532_0
  • defaults/win-64::anaconda-project-0.11.1-py311haa95532_0
  • defaults/win-64::conda-build-24.1.2-py311haa95532_0
  • defaults/noarch::conda-index-0.4.0-pyhd3eb1b0_0
  • defaults/noarch::conda-libmamba-solver-24.1.0-pyhd3eb1b0_0
  • defaults/win-64::conda-repo-cli-1.0.75-py311haa95532_0
  • defaults/noarch::conda-token-0.4.0-pyhd3eb1b0_0
  • defaults/win-64::console_shortcut-0.1.1-4
  • defaults/win-64::navigator-updater-0.4.0-py311haa95532_1
  • defaults/win-64::powershell_shortcut-0.0.1-3
    Packages: 480
    Files: 8

Downloading and Extracting Packages:

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(950): An error occurred while installing package ‘defaults::scikit-learn-1.2.2-py311hd77b12b_1’.
Rolling back transaction: done

LinkError: post-link script failed for package defaults::scikit-learn-1.2.2-py311hd77b12b_1
location of failed script: C:\ProgramData\anaconda3\envs\spyder_env\Scripts.scikit-learn-post-link.bat
==> script messages <==

==> script output <==
stdout:
stderr: ‘conda’ is not recognized as an internal or external command,
operable program or batch file.

return code: 255

For reference, here is the version info from my conda info:

(base) C:\WINDOWS\system32>conda info

active environment : base
conda version : 24.5.0
conda-build version : 24.1.2
python version : 3.11.7.final.0
solver : libmamba (default)
virtual packages : __archspec=1=x86_64_v3
__conda=24.5.0=0
__cuda=11.2=0
__win=0=0
base environment : C:\ProgramData\anaconda3 (writable)
conda av data dir : C:\ProgramData\anaconda3\etc\conda
conda av metadata url : None
administrator : True
netrc file : None
offline mode : False

What are you trying to do, what is your goal of cloning the base environment? There are some special things about the base environment around conda that makes it not a great choice to try and clone. If your goal is to create another environment with the main packages included in the installer without having to individually install them, you could use conda create -n spyder_env anaconda

1 Like

Hi Crystal.

Thanks for your reply, it resolves my query. Indeed, my goal was simply to make a new environment that would begin as a fresh Anaconda build, and I incorrectly thought cloning the base was the best way. Thanks for the explanation. The command you suggested does exactly what I need.

Many thanks,
Darren.