# Error when installing qiime2 within a conda environment using wls

**URL:** https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397
**Category:** Technical Support
**Tags:** install, windows, linux
**Created:** [June 19, 2022, 9:37pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397 "2022-06-19T21:37:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![peterjon123](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/p/f07891/32.png) [@peterjon123](https://forum.qiime2.org/u/peterjon123)
#### Post date: [June 19, 2022, 9:37pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397/1 "2022-06-19T21:37:00Z")

</div>

Hello,

I am nearly finished installing qiime2 on my windows laptop with a linux subsystem using ubuntu 22.04 LTS, but I'm having trouble with the last step of installing it within a conda environment. I receive the error message:

(base) peterjon123\_project@LAPTOP-MAUIA3K9:~$ conda env create -n qiime2-2022.2 --file qiime2-2022.2-py38-linux-conda.yml  
Collecting package metadata (repodata.json): failed

# \>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\> ERROR REPORT \<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<\<

```
Traceback (most recent call last):
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 374, in _load
    raw_repodata_str = fetch_repodata_remote_request(
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 818, in fetch_repodata_remote_request
    raise Response304ContentUnchanged()
conda.core.subdir_data.Response304ContentUnchanged

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/exceptions.py", line 1114, in __call__
    return func(*args, **kwargs)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda_env/cli/main.py", line 80, in do_call
    exit_code = getattr(module, func_name)(args, parser)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda_env/cli/main_create.py", line 143, in execute
    result[installer_type] = installer.install(prefix, pkg_specs, args, env)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda_env/installers/conda.py", line 50, in install
    unlink_link_transaction = solver.solve_for_transaction(
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/solve.py", line 152, in solve_for_transaction
    unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/solve.py", line 195, in solve_for_diff
    final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/solve.py", line 300, in solve_final_state
    ssc = self._collect_all_metadata(ssc)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/common/io.py", line 86, in decorated
    return f(*args, **kwds)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/solve.py", line 463, in _collect_all_metadata
    index, r = self._prepare(prepared_specs)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/solve.py", line 1058, in _prepare
    reduced_index = get_reduced_index(self.prefix, self.channels,
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/index.py", line 287, in get_reduced_index
    new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 139, in query_all
    result = tuple(concat(executor.map(subdir_query, channel_urls)))
  File "/home/peterjon123_project/anaconda3/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator
    yield fs.pop().result()
  File "/home/peterjon123_project/anaconda3/lib/python3.8/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/home/peterjon123_project/anaconda3/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/home/peterjon123_project/anaconda3/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 131, in <lambda>
    subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 144, in query
    self.load()
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 209, in load
    _internal_state = self._load()
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 392, in _load
    _internal_state = self._read_local_repdata(mod_etag_headers.get('_etag'),
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 441, in _read_local_repdata
    _internal_state = self._process_raw_repodata_str(raw_repodata_str)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/site-packages/conda/core/subdir_data.py", line 479, in _process_raw_repodata_str
    json_obj = json.loads(raw_repodata_str or '{}')
  File "/home/peterjon123_project/anaconda3/lib/python3.8/json/ __init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/home/peterjon123_project/anaconda3/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/peterjon123_project/anaconda3/lib/python3.8/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 3218 column 9 (char 98156)

```

`$ /home/peterjon123_project/anaconda3/bin/conda-env create -n qiime2-2022.2 --file qiime2-2022.2-py38-linux-conda.yml`

environment variables:  
CIO\_TEST=  
CONDA\_AUTO\_UPDATE\_CONDA=false  
CONDA\_DEFAULT\_ENV=base  
CONDA\_EXE=/home/peterjon123\_project/anaconda3/bin/conda  
CONDA\_PREFIX=/home/peterjon123\_project/anaconda3  
CONDA\_PROMPT\_MODIFIER=(base)  
CONDA\_PYTHON\_EXE=/home/peterjon123\_project/anaconda3/bin/python  
CONDA\_ROOT=/home/peterjon123\_project/anaconda3  
CONDA\_SHLVL=1  
CURL\_CA\_BUNDLE=  
PATH=/home/peterjon123\_project/anaconda3/bin:/home/peterjon123\_project/anac  
onda3/bin:/home/peterjon123\_project/anaconda3/condabin:/usr/local/sbin  
:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ga  
mes:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu22.04  
LTS\_2204.0.10.0\_x64\_\_79rhkp1fndgsc:/mnt/c/Program Files  
(x86)/Intel/iCLS Client:/mnt/c/Program Files/Intel/iCLS Client:/mnt/c/  
WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WI  
NDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files  
(x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program  
Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program  
Files (x86)/Intel/Intel(R) Management Engine  
Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine C  
omponents/IPT:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Users/Owner/AppDa  
ta/Local/Microsoft/WindowsApps:/snap/bin  
REQUESTS\_CA\_BUNDLE=  
SSL\_CERT\_FILE=

```
 active environment : base
active env location : /home/peterjon123_project/anaconda3
        shell level : 1
   user config file : /home/peterjon123_project/.condarc

```

populated config files :  
conda version : 4.13.0  
conda-build version : 3.20.5  
python version : 3.8.5.final.0  
virtual packages : \_\_linux=4.4.0=0  
\_\_glibc=2.35=0  
\_\_unix=0=0  
\_\_archspec=1=x86\_64  
base environment : /home/peterjon123\_project/anaconda3 (writable)  
conda av data dir : /home/peterjon123\_project/anaconda3/etc/conda  
conda av metadata url : None  
channel URLs : [main/linux-64](https://repo.anaconda.com/pkgs/main/linux-64)  
[main/noarch](https://repo.anaconda.com/pkgs/main/noarch)  
[r/linux-64](https://repo.anaconda.com/pkgs/r/linux-64)  
[r/noarch](https://repo.anaconda.com/pkgs/r/noarch)  
package cache : /home/peterjon123\_project/anaconda3/pkgs  
/home/peterjon123\_project/.conda/pkgs  
envs directories : /home/peterjon123\_project/anaconda3/envs  
/home/peterjon123\_project/.conda/envs  
platform : linux-64  
user-agent : conda/4.13.0 requests/2.24.0 CPython/3.8.5 Linux/4.4.0-19041-Microsoft ubuntu/22.04 glibc/2.35  
UID:GID : 1000:1000  
netrc file : None  
offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve  
future releases of conda.  
Would you like conda to send this report to the core maintainers?

No report sent. To permanently opt-out, use

```
$ conda config --set report_errors false

```

I saw there was a similar thread posted by someone else, and the suggestion there was to delete the file and redownload it. I tried that, and I didn't have any luck. Do you have any other suggestions.

Thank you,

Jonathan

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [June 22, 2022, 9:27pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397/2 "2022-06-22T21:27:11Z")

</div>

Hi Jonathan,

Welcome to the :qiime2: forum!

To my knowledge, this error is due to an incomplete file (which may have been due to an issue while downloading) - can you please share how you downloaded the QIIME 2 environment file (either screenshots or copy/paste your terminal output)? Thanks! 🦎

---

<div class="post-metadata">

### Author: ![peterjon123](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/p/f07891/32.png) [@peterjon123](https://forum.qiime2.org/u/peterjon123)
#### Post date: [June 23, 2022, 4:21pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397/3 "2022-06-23T16:21:11Z")

</div>

Hello,

Thank you for getting back to me. I used the command that was on the [qiime2.org](http://qiime2.org) site for natively installing qiime2 in Windows Subsystem for Linux (64 bit):

wget [https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml](https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml)

Here's the terminal output (note: I've done this a few times, so that's why it is saved as qiime2-2022.2-py38-linux-conda.yml.3):

(base) peterjon123\_project@LAPTOP-MAUIA3K9:~$ wget [https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml](https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml)  
--2022-06-23 12:17:42-- [https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml](https://data.qiime2.org/distro/core/qiime2-2022.2-py38-linux-conda.yml)  
Resolving [data.qiime2.org](http://data.qiime2.org) ([data.qiime2.org](http://data.qiime2.org))... 54.200.1.12  
Connecting to [data.qiime2.org](http://data.qiime2.org) ([data.qiime2.org](http://data.qiime2.org))|54.200.1.12|:443... connected.  
HTTP request sent, awaiting response... 302 FOUND  
Location: [https://raw.githubusercontent.com/qiime2/environment-files/master/2022.2/release/qiime2-2022.2-py38-linux-conda.yml](https://raw.githubusercontent.com/qiime2/environment-files/master/2022.2/release/qiime2-2022.2-py38-linux-conda.yml) [following]  
--2022-06-23 12:17:43-- [https://raw.githubusercontent.com/qiime2/environment-files/master/2022.2/release/qiime2-2022.2-py38-linux-conda.yml](https://raw.githubusercontent.com/qiime2/environment-files/master/2022.2/release/qiime2-2022.2-py38-linux-conda.yml)  
Resolving [raw.githubusercontent.com](http://raw.githubusercontent.com) ([raw.githubusercontent.com](http://raw.githubusercontent.com))... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...  
Connecting to [raw.githubusercontent.com](http://raw.githubusercontent.com) ([raw.githubusercontent.com](http://raw.githubusercontent.com))|185.199.109.133|:443... connected.  
HTTP request sent, awaiting response... 200 OK  
Length: 9923 (9.7K) [text/plain]  
Saving to: ‘qiime2-2022.2-py38-linux-conda.yml.3’

qiime2-2022.2-py38-linux-cond 100%[=================================================\>] 9.69K --.-KB/s in 0.02s

2022-06-23 12:17:44 (548 KB/s) - ‘qiime2-2022.2-py38-linux-conda.yml.3’ saved [9923/9923]

Is this what you wanted? If not, let me know and I can try to find the right output.

Thanks again for your help,

Jonathan

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [June 23, 2022, 4:21pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397/4 "2022-06-23T16:21:18Z")

</div>



---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [June 28, 2022, 5:41pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397/5 "2022-06-28T17:41:36Z")

</div>

Hi @peterjon123,

Thanks for providing those details! I have a couple of follow-up questions:

1. Are you running these commands within your WSL terminal? If not, you'll need to re-run all of the install commands within your WSL terminal.

2. Have you made sure you're running the latest version of `conda`? If not, you'll need to run `conda update conda` within your WSL terminal before re-trying your install commands.

Please try these suggestions, and let me know if you are still running into the same issue!

Cheers 🦎

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [June 28, 2022, 5:41pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397/6 "2022-06-28T17:41:39Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [July 29, 2022, 11:41pm UTC](https://forum.qiime2.org/t/error-when-installing-qiime2-within-a-conda-environment-using-wls/23397/7 "2022-07-29T23:41:44Z")

</div>

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