pythoncondacartopymamba

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


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


Solution

  • 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.