Issue when installing new Qiime2 amplicon release on Windows

Hi everyone,

I have a student who is having issues installing the newest Qiime2 release in the local environment of his Windows PC. I've determined it's an issue with the .yml file, but I can't seem to get beyond that. (For context, I'm a Mac user.) After running wget to pull the file from the repository, we're having issues running:

conda env create -n qiime2-amplicon-2023.9 --file qiime2-amplicon-2023.9-py38-linux-conda.yml

We tried running with plugins disabled, and got the same error. The error message mentions an issue with the mapping values not being allowed, which could be due to incorrect indentation or other syntax problems, but when I look at the yml file, it looks good to me. Help!

Here's the full error report (I tried running on one of the classroom PCs and got the same error):

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda\", line 17, in __call__
    return func(*args, **kwargs)
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\cli\", line 56, in do_call
    exit_code = getattr(module, func_name)(arguments, parser)
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda\notices\", line 124, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\cli\", line 105, in execute
    spec = specs.detect(
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\specs\", line 72, in detect
    if spec.can_handle():
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\specs\", line 19, in can_handle
    self._environment = env.from_file(self.filename)
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\", line 191, in from_file
    return from_yaml(yamlstr, filename=filename)
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\", line 158, in from_yaml
    data = yaml_safe_load(yamlstr)
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda\common\", line 53, in yaml_safe_load
    return _yaml_safe().load(string)
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 434, in load
    return constructor.get_single_data()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 119, in get_single_data
    node = self.composer.get_single_node()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 76, in get_single_node
    document = self.compose_document()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 102, in compose_document
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 168, in get_event
    self.current_event = self.state()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 253, in parse_document_end
    token = self.scanner.peek_token()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 188, in peek_token
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 288, in fetch_more_tokens
    return self.fetch_value()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\", line 657, in fetch_value
    raise ScannerError(
ruamel.yaml.scanner.ScannerError: mapping values are not allowed here
  in "<unicode string>", line 5, column 60:
     ...  automatically to the target URL: <a href="https://raw.githubuse ...
                                         ^ (line: 5)

$ C:\Users\macyrick\miniconda3\Scripts\ create -n qiime2-amplicon-2023.9 --file qiime2-amplicon-2023.9-py38-linux-conda.yml

environment variables:
Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\W
v1.0;C:\WINDOWS\System32\OpenSSH;C:\WINDOWS\CCM;C:\Program Files
(x86)\Common Files\Pulse Secure\VC142.CRT\X64;C:\Program
Files\PowerShell\7;C:\Program Files\PuTTY;C:\Users\macyrick\miniconda3
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\

 active environment : qiime2-amplicon-2023.9
active env location : C:\Users\macyrick\miniconda3\envs\qiime2-amplicon-2023.9
        shell level : 2
   user config file : C:\Users\macyrick\.condarc

populated config files : C:\Users\macyrick.condarc
conda version : 23.9.0
conda-build version : not installed
python version :
virtual packages : __archspec=1=x86_64
base environment : C:\Users\macyrick\miniconda3 (writable)
conda av data dir : C:\Users\macyrick\miniconda3\etc\conda
conda av metadata url : None
channel URLs : bioconda/win-64
package cache : C:\Users\macyrick\miniconda3\pkgs
envs directories : C:\Users\macyrick\miniconda3\envs
platform : win-64
user-agent : conda/23.9.0 requests/2.31.0 CPython/3.11.4 Windows/10 Windows/10.0.19044
administrator : False
netrc file : None
offline mode : False

An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install

Upload successful.

Hello Macy,

Welcome back to the forums! :qiime2:

Qiime2 does work on Windows, but only through WSL.
(Conda and Conda Forge do support Windows directly, so it can be a bit surprising that Qiime2 only works through WSL.)

I didn't see it mentioned in the post, so just to check, is he using WSL or trying to do it directly on Windows?


Hi Colin! Thanks so much for taking the time to read and respond to my post. My student is using WSL, so I'm unsure as to why this error is happening.

1 Like

OK great!

Something else is going on here... :window: :qiime2:

If the student is using WSL, why are there Windows style paths?

File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda\", line 17, in __call__
    return func(*args, **kwargs)

I suspect that something has gone sideways and normal Windows is being used instead.

For comparison, I also use Qiime2 on Windows and here's what my WSL looks like:

WSL terminal on the top
VS Code terminal on the bottom

I can tell it's WSL because everything starts with /home and not C:\

1 Like

Hi Colin! First of all, thank you for your kind response. To clarify, my student and I are both running these commands in tandem on two different laptops (him on his personal laptop and me on a classroom Dell laptop).

So you're right, I'm definitely still running Windows style paths. I thought I was running WSL because I ran the command wsl --install, checked to make sure WSL was enabled in the settings, and then restarted the computer, but it looks like I'm still running Windows style paths - at this point, I cannot for the life of me figure out how to enable WSL.

This is turning out to be a very simple problem, but I'm at an impasse. Thank you so much for taking the time to help!

1 Like

I know how it goes sometimes :upside_down_face:

Here's two ways to get to the WSL terminal:

Open WSL directly from the :window: Start Menu:
Start > type "WSL" to search > click on :penguin: icon

In real life, I'm almost always using a terminal along with code / text files / notes / notebook.
And for that, I use VS Code. It's free and works identically on Windows and OSX.

Terminal > New Terminal.
Then on the right side of the screen, click + > Ubuntu (WSL)

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