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\exception_handler.py", line 17, in __call__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\cli\main.py", line 56, in do_call
    exit_code = getattr(module, func_name)(arguments, parser)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda\notices\core.py", line 124, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\cli\main_create.py", line 105, in execute
    spec = specs.detect(
           ^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\specs\__init__.py", line 72, in detect
    if spec.can_handle():
       ^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\specs\yaml_file.py", line 19, in can_handle
    self._environment = env.from_file(self.filename)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\env.py", line 191, in from_file
    return from_yaml(yamlstr, filename=filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda_env\env.py", line 158, in from_yaml
    data = yaml_safe_load(yamlstr)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\conda\common\serialize.py", line 53, in yaml_safe_load
    return _yaml_safe().load(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\main.py", line 434, in load
    return constructor.get_single_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\constructor.py", line 119, in get_single_data
    node = self.composer.get_single_node()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\composer.py", line 76, in get_single_node
    document = self.compose_document()
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\composer.py", line 102, in compose_document
    self.parser.get_event()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\parser.py", line 168, in get_event
    self.current_event = self.state()
                         ^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\parser.py", line 253, in parse_document_end
    token = self.scanner.peek_token()
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\scanner.py", line 188, in peek_token
    self.fetch_more_tokens()
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\scanner.py", line 288, in fetch_more_tokens
    return self.fetch_value()
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\macyrick\miniconda3\Lib\site-packages\ruamel\yaml\scanner.py", 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\conda-env-script.py create -n qiime2-amplicon-2023.9 --file qiime2-amplicon-2023.9-py38-linux-conda.yml

environment variables:
CIO_TEST=
CONDA_AUTO_UPDATE_CONDA=false
CONDA_DEFAULT_ENV=qiime2-amplicon-2023.9
CONDA_EXE=C:\Users\macyrick\miniconda3\condabin..\Scripts\conda.exe
CONDA_EXES="C:\Users\macyrick\miniconda3\condabin..\Scripts\conda.exe"
CONDA_PREFIX=C:\Users\macyrick\miniconda3\envs\qiime2-amplicon-2023.9
CONDA_PREFIX_1=C:\Users\macyrick\miniconda3
CONDA_PROMPT_MODIFIER=(qiime2-amplicon-2023.9)
CONDA_PYTHON_EXE=C:\Users\macyrick\miniconda3\python.exe
CONDA_ROOT=C:\Users\macyrick\miniconda3
CONDA_SHLVL=2
CURL_CA_BUNDLE=
HOMEPATH=\Users\macyrick
LD_PRELOAD=
PATH=C:\Users\macyrick\miniconda3\envs\qiime2-amplicon-
2023.9;C:\Users\macyrick\miniconda3\envs\qiime2-amplicon-
2023.9\Library\mingw-w64\bin;C:\Users\macyrick\miniconda3\envs\qiime2-
amplicon-
2023.9\Library\usr\bin;C:\Users\macyrick\miniconda3\envs\qiime2-
amplicon-2023.9\Library\bin;C:\Users\macyrick\miniconda3\envs\qiime2-
amplicon-2023.9\Scripts;C:\Users\macyrick\miniconda3\envs\qiime2-
amplicon-2023.9\bin;C:\Users\macyrick\miniconda3\condabin;C:\Program
Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\W
INDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell
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
;C:\Users\macyrick\miniconda3\Library\mingw-
w64\bin;C:\Users\macyrick\miniconda3\Library\usr\bin;C:\Users\macyrick
\miniconda3\Library\bin;C:\Users\macyrick\miniconda3\Scripts;C:\Users
macyrick\AppData\Local\Microsoft\WindowsApps
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows
PowerShell\v1.0\Modules
REQUESTS_CA_BUNDLE=
SSL_CERT_FILE=C:\Users\macyrick\miniconda3\Library\ssl\cacert.pem
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 : 3.11.4.final.0
virtual packages : __archspec=1=x86_64
__win=0=0
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
bioconda/noarch
main/win-64
main/noarch
r/win-64
r/noarch
msys2/win-64
msys2/noarch
package cache : C:\Users\macyrick\miniconda3\pkgs
C:\Users\macyrick.conda\pkgs
C:\Users\macyrick\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\macyrick\miniconda3\envs
C:\Users\macyrick.conda\envs
C:\Users\macyrick\AppData\Local\conda\conda\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?

2 Likes

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\exception_handler.py", 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.