QIIME2 Installation: CondaValueError: Cannot create a conda environment with ':' in the prefix. (about insufficient disk space for qiime2 installation, and it solved by install WSL at a non-system disk)

Hi,
I've prepared a conda environment by WSL, but I meet an issue when I want to install QIIME 2 within a conda environment. When I type the default instructions "conda env create -n qiime2-amplicon-2024.5 --file https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-linux-conda.yml" (Natively installing QIIME 2 — QIIME 2 2024.5.0 documentation) under the base environment of WSL application window, it shows "CondaValueError: Cannot create a conda environment with ':' in the prefix. Aborting.". How it works? Following is the screenshot:


Thanks!

Hello Yangyue,

Welcome to the forums! :qiime2:

I wonder if this is an issue with older versions of Conda?

Did you run conda update conda and did the conda update install okay?

1 Like

When I installed Miniconda as Linux distribution in the WSL, I executed the sentence "conda init"twice, make sure it has been fully installed. Then I executed"conda update conda" twice, and finally it show there has nothing to be update. So is there any other way to confirm conda has been updated fully and truly?
Thanks!

That sounds like the update was successful!

Conda will tell you how the update went.
A successful update with conda will look like this:

Downloading and Extracting Packages:
                                                                                                                                                     
Preparing transaction: done                                                                                                                          
Verifying transaction: done                                                                                                                          
Executing transaction: done                                                                                                                          

Now that conda is updated, can you try to install Qiime2 again using that same command?

I've executed "conda update conda" in WSL again, and the result is same as your describtion, so I type the default instructions "conda env create -n qiime2-amplicon-2024.5 --file https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-linux-conda.yml", it not success. Following is the screenshot:

Then, I tured off the WSL window, open a new, and type "conda update conda", it shows "# All requested packages already installed.".
When I run the sentence "conda env create -n qiime2-amplicon-2024.5 --file https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-linux-conda.yml" again, it was go wrong just like before, how it should be resolved? Following is the screenshot:


Thank you!

1 Like

Hi @yangyue
hmm, this is weird. You should be able to use filepaths in the newest release of conda but obviously that isnt working for you.

Could you try "Wget"ing the file:


 wget https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-linux-conda.yml

and then conda activating with the local file:

conda env create -n qiime2-amplicon-2024.5 --file qiime2-amplicon-2024.5-py39-linux-conda.yml 

I think this should work, but I don't think it solves the bigger issue here.

1 Like

I've uninstalled WSL and installed it again, and I make sure this issue has been resolved. However, I want to move the installed WSL to another disk (non-system disk), my system disk has little storage to restore both of the QIIME2 distribution (Amplicon and Metagenome), how can I achieve this goal?
The following is the methods which I've found from the website:

## Move the installed WSL to a non-system disk:
## Turn off WSL.
wsl --shutdown
wsl -l -v
## Backup the distribution to another disk.
wsl --export Ubuntu D:\WSL\Ubuntu.tar
  ## (or replaced with)
wsl --export Ubuntu D:\WSL\ext4.vhdx --vhd
## Uninstall the current distrubution
wsl --unregister Ubuntu
wsl -l -v
## Create disc image of WSL on the target disk.
wsl --import Ubuntu D:\WSL D:\WSL\Ubuntu.tar --version 2
 ## (or replaced with)
wsl --import-in-place Ubuntu D:\WSL\ext4.vhdx
## Run the new distribution.
wsl -d Ubuntu
## Return to the new distribution with a non-root user account.
Ubuntu config --default-user yangyue
     ## Another way(using a git application "move-wsl-master")
     cd D:\WSL\move-wsl-master
     .\move-wsl.ps1
     ## Another way (Show wrong!)
     mkdir D:\WSLHome
     wsl --mount D:\WSLHome --target /home

However, when I run the code above, the WSL has not been moved to my D: disk (my non-system disk). How to move WSL to non-system disk turely?
Thank you!

1 Like

Hello @yangyue,

To my knowledge none of us here are very familiar with WSL, so your most recent question will probably be better served on an WSL-specific help forum. Sorry about that.

4 Likes

I can not move the work space of WSL, but I found another way to solve this question, the code as following:

mkdir -p /mnt/d/WSL/conda_env/miniconda3
## Set the recognition way of upper/lower cases in Windows PowerShell:
fsutil.exe file queryCaseSensitiveInfo D:\WSL\conda_env\miniconda3
fsutil.exe file setCaseSensitiveInfo D:\WSL\conda_env\miniconda3 enable
fsutil.exe file queryCaseSensitiveInfo D:\WSL\conda_env\miniconda3
## Turn off Windows PowerShell, and type these sentences in WSL to install WSL at a non-system disk:
cd /mnt/d/WSL/conda_env/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /mnt/d/WSL/conda_env/miniconda3/miniconda.sh
cd /mnt/d/WSL/conda_env
bash /mnt/d/WSL/conda_env/miniconda3/miniconda.sh -b -u -p /mnt/d/WSL/conda_env/miniconda3
rm -rf /mnt/d/WSL/conda_env/miniconda3/miniconda.sh
/mnt/d/WSL/conda_env/miniconda3/bin/conda init bash
/mnt/d/WSL/conda_env/miniconda3/bin/conda init zsh
## Turn off and re-open WSL.
## Type these codes, when “package list” appears, Miniconda has been installed correctly:
cd /mnt/d/WSL/conda_env/miniconda3
conda list
## Type these words, when “modified” appears,Miniconda has been installed totally:
conda init
## Update Miniconda, when there has package to update, type“y”:
conda update conda

So WSL has been installed on a non-system disk.
Even though the WSL has been installed well, the "creat conda" command can not install qiime2 correctly, I'm puzzled.

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.