Error when installing qiime2 within a conda environment using wls

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) [email protected]:~$ 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
main/noarch
r/linux-64
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

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! :lizard:

Hello,

Thank you for getting back to me. I used the command that was on the 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

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) [email protected]:~$ wget 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
Resolving data.qiime2.org (data.qiime2.org)... 54.200.1.12
Connecting to data.qiime2.org (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 [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
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (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