mamba
mamba copied to clipboard
mamba install Could not open lockfile
Hi, we have a bunch of warning/errors when we try to install with mamba.
The installation works but those messages makes us nervous (we're introducing mamba to our team and having a bunch of warnings doesn't look good).
We have installed miniconda with another user with elevated permissions (our current user doesn't have permissions to write those files) and /opt/anaconda/miniconda3/pkgs/cache
has the following permissions: drwxrwsr-x.
.
When we run conda
instead of mamba
, we don't have those messages.
We could change the permissions of the cache
directory but we're confused as to why conda
doesn't have those messages.
The first message is probably related to #1697.
$ mamba install python=3.10
.....
Looking for: ['python=3.10']
error libmamba Error opening for writing "/opt/anaconda/miniconda3/pkgs/urls.txt": Permission denied
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
.....
Error opening for writing "/opt/anaconda/miniconda3/pkgs/urls.txt": Permission denied
I used it to temporarily solve the problem. https://github.com/mamba-org/mamba/issues/488#issuecomment-963351740
Fixed by adding the following in the user .condarc
pkgs_dirs:
- /home/<user>/.conda/pkgs
Let's keep this open because you shouldn't see that many messages.
@cacharle can you check what version of mamba you are on? I just tried to recreate this issue and didn't succed with mamba 0.24.0
Still have the same errors with 0.24.0:
$ mamba create -n yesplease python=3.9 pandas
__ __ __ __
/ \ / \ / \ / \
/ \/ \/ \/ \
███████████████/ /██/ /██/ /██/ /████████████████████████
/ / \ / \ / \ / \ \____
/ / \_/ \_/ \_/ \ o \__,
/ _/ \_____/ `
|/
███╗ ███╗ █████╗ ███╗ ███╗██████╗ █████╗
████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
██╔████╔██║███████║██╔████╔██║██████╔╝███████║
██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
██║ ╚═╝ ██║██║ ██║██║ ╚═╝ ██║██████╔╝██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝
mamba (0.24.0) supported by @QuantStack
GitHub: https://github.com/mamba-org/mamba
Twitter: https://twitter.com/QuantStack
█████████████████████████████████████████████████████████████
Looking for: ['python=3.9', 'pandas']
error libmamba Error opening for writing "/opt/anaconda/miniconda3/pkgs/urls.txt": Permission denied
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
error libmamba Could not open lockfile '/opt/anaconda/miniconda3/pkgs/cache/cache.lock'
warning libmamba LockFile creation for path '/opt/anaconda/miniconda3/pkgs/cache' failed, continuing without it
Thanks for getting back! OK, we'll have a look.
I think you gave us the read-write-execute permissions from the "view of the admin".
I was able to recreate noisy warnings / errors when using 0555
as permissions which makes the directory read-only for all users (the own user included).
We'll try to come up with a fix / silence the warnings.
Is this fixed?
One issue the above solution has, is that one's home path is not always /home/<user>
, for example if a user's home directory is mounted at someplace other that /home/<user>
like can happen on different servers or in a docker container.
I was able to simply add multiple paths to thepkgs_dirs:
list in ~/.condarc
:
pkgs_dirs:
- home/<user>/.conda/pkgs
- people/<user>/.conda/pkgs
Now, on our system, one or both of those paths won't be available on any given server that one's .condarc
file follows them to.
This seems to work on both servers I tried this on. That is, I don't get a conda error or the fileloc errors. Is there any negative consequence to this from conda's perspective?
Another alternative seems to be this in ~/.condarc
:
pkgs_dirs:
- ~/.conda/pkgs
Which of those solutions is advised?
I still experience this bug on mamba 1.5.4 conda 23.11.0 with a miniconda installation.
Adding the following to my ~/.condarc
worked for me:
pkgs_dirs:
- ~/.conda/pkgs
But I wonder why is ~/.conda/pkgs
not used per default if the user has no write permission on the central path ($CONDA_PREFIX/pkgs
)?