biocore / q2-mislabeled

A QIIME 2 plugin for assessing sample mislabeling and contamination
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Successful Qiime2-2022.11 and sourcetracker2 (v 2.0.1.dev0) install, but error on install of q2-mislabeled #3

Closed callaband closed 10 months ago

callaband commented 10 months ago

Okay, in my qiime2-2022.11 environment, I am trying to install q2-mislabeled. I have installed sourcetracker2, which installs and sourcetracker2 --help works with no issue. Current version installed is 2.0.1.dev0 - I know someone else who is successfully using q2-mislabeled with this version.

But I still get

ERROR: Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
q2-mislabeled depends on sourcetracker@ https://github.com/wasade/sourcetracker2/archive/be_sparse.zip

What should I do?

wasade commented 10 months ago

How was the install for this q2-mislabeled performed?

wasade commented 10 months ago

...pip has been changing a lot, as have package dependency specifications, so something may have broken since we last looked at this stuff.

I'd be curious if cloning this repo, and then issuing pip install -e . works

callaband commented 10 months ago

Found someone who had a similar issues and pip install https://github.com/biocore/q2-mislabeled/archive/refs/heads/main.zip instead of pip install https://github.com/biota/sourcetracker2/archive/master.zip or pip3 install https://github.com/biota/sourcetracker2/archive/master.zip Seems to work for both qiime2-2022.11 and qiime2-2023.5

wasade commented 10 months ago

Ya, the master branch of sourcetracker2 does not work for this

callaband commented 10 months ago

Got one last error, when I tried to initialize qiime mislabeled, I got an error regarding the file citations.bib not existing in that version, so I changed to the relevant folder cd /opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/sourcetracker/_q2 and wget https://github.com/caporaso-lab/sourcetracker2/raw/db7f92a9ef9291a5472149168aa6753ac87bc6ff/sourcetracker/_q2/citations.bib, which seems to have solved the issue.

Original error:

Traceback (most recent call last):
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/util.py", line 266, in get_plugin_manager
    return qiime2.sdk.PluginManager.reuse_existing()
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 58, in reuse_existing
    raise UninitializedPluginManagerError
qiime2.sdk.plugin_manager.UninitializedPluginManagerError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/envs/qiime2-2023.5/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/click/core.py", line 1651, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/click/core.py", line 1698, in resolve_command
    cmd = self.get_command(ctx, cmd_name)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/commands.py", line 100, in get_command
    plugin = self._plugin_lookup[name]
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/commands.py", line 76, in _plugin_lookup
    import q2cli.core.cache
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/core/cache.py", line 285, in <module>
    CACHE = DeploymentCache()
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/core/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
    self._cache_current_state(current_requirements)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/core/cache.py", line 205, in _cache_current_state
    state = self._get_current_state()
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/core/cache.py", line 253, in _get_current_state
    plugin_manager = q2cli.util.get_plugin_manager()
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/q2cli/util.py", line 278, in get_plugin_manager
    return qiime2.sdk.PluginManager()
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 67, in __new__
    self._init(add_plugins=add_plugins)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 105, in _init
    plugin = entry_point.load()
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2517, in load
    return self.resolve()
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2523, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/sourcetracker/_q2/plugin_setup.py", line 78, in <module>
    citations = qiime2.plugin.Citations.load(
  File "/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/qiime2/core/cite.py", line 30, in load
    with open(path) as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/anaconda3/envs/qiime2-2023.5/lib/python3.8/site-packages/sourcetracker/_q2/citations.bib
wasade commented 10 months ago

@callaband, it may be faster if we chat on slack? In this case, it looks like the master branch of sourcetracker2 was installed which is broken