conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6.16k stars 319 forks source link

Mambaforge installation on Win10 WSL cannot find cache it just unpacked #205

Open bioXiaoheng opened 3 years ago

bioXiaoheng commented 3 years ago

I'm trying to install Mambaforge on my windows 10 home (version 10.0.19043 build 19043) WSL (v 10.0.19041.1151, Ubuntu version 2004.2021.222.0) so that I can set up snakemake. The installation directory (/mnt/c/ProgramData/) already has Anaconda3 installed.

I downloaded the installation script (from wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh) and ran it. After the script unpacked payload, it lists the specs to update and throw out the warning:

WARNING Size incorrect, file modified in package cache "/mnt/c/ProgramData/mambaforge/pkgs/ncurses-6.2-h58526e2_4/share/terminfo/E/Eterm"
WARNING Could not read paths.json from "/mnt/c/ProgramData/mambaforge/pkgs/ncurses-6.2-h58526e2_4"

After this, it shows a summary of 60 packages to install, and as it goes through "transactions", the error below always comes up & terminates the installation.

ERROR   Cannot find cache for ncurses-6.2-h58526e2_4.tar.bz2

I have removed the folder and repeat the installation steps but the error persists. How do I install it on my system?

hmaarrfk commented 3 years ago

Honestly, we don't really test with WSL.

My guess is that this is an issue with constructor https://github.com/conda/constructor

Can you try to install the related miniconda version in WSL? https://docs.conda.io/en/latest/miniconda.html

Please report back your results.

If that doesn't work, then there is little chance of miniforge working. If it doesn't work, then I would open an issue in the constructor repo above and cross reference it here.

bioXiaoheng commented 3 years ago

Hi Mark,

Thanks for the prompt response!

I tried installing miniconda3 using the script Miniconda3-py38_4.9.2-Linux-x86_64.sh and it works out. I will try the conda option to install mamba/mambaforge next and will report back on how it went.

Best, Xiaoheng

hmaarrfk commented 3 years ago

total wild guess: i have a feeling it is with the fact that the ncurses package has hardlinks to paths that clash when you remove the capitalization.

I'm not really sure where the bug is for this.

Linux explicitly supports paths with different capitalization. Windows explicitely does not support this.

My tip, bite the bullet, dual boot into linux to do linux development. Even if we fix this "issue". You will continue to hit others like this.

bioXiaoheng commented 3 years ago

Hi Mark,

Sorry for the delayed update. Yes I was able to use the conda option to install mamba and start following the snakemake tutorial (https://snakemake.readthedocs.io/en/stable/tutorial/setup.html). When executing the command mamba env create --name snakemake-tutorial --file environment.yaml, however, a (by this point) familiar error message appeared

SafetyError: The package for ncurses located at /mnt/c/ProgramData/miniconda3/pkgs/ncurses-6.1-hf484d3e_1002
appears to be corrupted. The path 'share/terminfo/e/eterm'
has an incorrect size.
  reported size: 842 bytes
  actual size: 2274 bytes

SafetyError: The package for ncurses located at /mnt/c/ProgramData/miniconda3/pkgs/ncurses-6.1-hf484d3e_1002
appears to be corrupted. The path 'share/terminfo/e/eterm-color'
has an incorrect size.
  reported size: 1249 bytes
  actual size: 2274 bytes

Despite the two errors though, this command was still able to complete itself, and the command conda activate snakemake-tutorial still works.

Do these errors have to do with how Linux/Windows deals with capitalization? I briefly checked the two files above on Ubuntu terminal and they're not plain text files (so there's little I could find)... Attached are the two files I cp & tar -czf from the directory; not sure how helpful they are but I hope they could offer some clues...?

Many thanks again, Xiaoheng

eterm_files.tar.gz

isuruf commented 3 years ago

I suggest opening this in https://github.com/mamba-org/mamba/ and mention that micromamba (used in mambaforge installer) and mamba both have the same issue.

bioXiaoheng commented 3 years ago

I suggest opening this in https://github.com/mamba-org/mamba/ and mention that micromamba (used in mambaforge installer) and mamba both have the same issue.

Hi Isuru,

Thank you for the suggestion. I have now opened a new issue there: https://github.com/mamba-org/mamba/issues/1144 with info in this thread. Hopefully that helps.

cvjjm commented 2 years ago

The exact same issue also prevents installation of plain miniforge under WSL2.

tomviolin commented 2 years ago

I may be a bit late to the game here, but every WSL2 Linux distribution has as its root filesystem an ext4 filesystem (or at least what looks and behaves like an ext4 filesystem that is fully case sensitive. I have yet to encounter any Linux software to fail in WSL2 due to incompatibilities with that root filesystem. (There are some programs or subsystems like the "snap" package manager that are not compatible (yet) due to lack of kernel support or other issues.)

The problems being discussed in this thread seem to be arising when you try to share the same package cache with the Windows version.

One thing you might consider trying is to map the Linux filesystem to a drive letter in Windows and try installing the Windows miniconda / mambaforge / what-have-you onto that drive.

In my experience, using the Linux filesystem from Windows and vice-versa are logistically very valuable, but both links exhibit much slower performance than using the native filesystem on each side. This could potentially wipe out whatever performance gains you may have been trying to achieve by sharing the package cache between the WSL2 and Windows installations.