Mamba error while creating a new virtual environment: could not open lock file

837 Views Asked by At

When I run the following command:

mamba create --name eco-tech-h2gam-venv regionmask cartopy

I get this error:

Looking for: ['regionmask', 'cartopy']

error    libmamba Could not open lockfile 'C:\ProgramData\anaconda3\pkgs\cache\cache.lock'

Any idea how to overcome it?

Additional Details

  • OS: Windows 11
  • Anaconda 3 base distribution
1

There are 1 best solutions below

0
On BEST ANSWER

Lock files can be cleared using the mamba clean --locks command. See in the documentation (abridged):

$ mamba clean -h
# usage: mamba clean [-h] [-a] [-i] [-p] [-t] [-f] [-c [TEMPFILES ...]] [-l] [--json] [-v]
#                    [-q] [-d] [-y] [--locks]
# 
# Removal Targets:
#   --locks               Remove lock files.