getzlab / CLUMPS2

Re-factored code for CLUMPS.
2 stars 0 forks source link

Installation failure #9

Open npechl opened 4 days ago

npechl commented 4 days ago

Hi,

I am trying to use CLUMPS2 but I am failing to successfully install it on a WSL conda environment. I follow the instructions that are provided in the README file but after trying several times (using either pip or conda) I am always getting the following error:

clumps -h

Traceback (most recent call last):
  File "/home/nikopech/.local/bin/clumps", line 33, in <module>
    sys.exit(load_entry_point('clumps', 'console_scripts', 'clumps')())
  File "/home/nikopech/.local/bin/clumps", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/mnt/c/Users/nikospech/Desktop/CLUMPS2/clumps/clumps.py", line 17, in <module>
    from canine import Orchestrator
  File "/home/nikopech/.local/lib/python3.10/site-packages/canine/__init__.py", line 1, in <module>
    from .orchestrator import Orchestrator, version as __version__
  File "/home/nikopech/.local/lib/python3.10/site-packages/canine/orchestrator.py", line 8, in <module>
    from .adapters import AbstractAdapter, ManualAdapter, FirecloudAdapter
  File "/home/nikopech/.local/lib/python3.10/site-packages/canine/adapters/__init__.py", line 2, in <module>
    from .firecloud import FirecloudAdapter
  File "/home/nikopech/.local/lib/python3.10/site-packages/canine/adapters/firecloud.py", line 8, in <module>
    import dalmatian
  File "/home/nikopech/.local/lib/python3.10/site-packages/dalmatian/__init__.py", line 2, in <module>
    from .core import *
  File "/home/nikopech/.local/lib/python3.10/site-packages/dalmatian/core.py", line 6, in <module>
    from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

Is there any chance that you have encountered the same error? Do you have any environment setup already functioning CLUMPS2 that you could share with us?

Regards, Nikos

julianhess commented 4 days ago

Hi, this is a known issue with the collections package. I would follow this advice in this StackOverflow post.

npechl commented 4 days ago

Thank you for your quick reply!

I have already tried to dowgrade the Python version I am using during installation. However, once I do that, I need to manually install each dependency for CLUMPS (I use conda for this), since pip install -e . throws a different error. After installing everything, the same error persists: ImportError: cannot import name 'Iterable' from 'collections'

May I ask which Python version are you using for the tool?

Nikos

julianhess commented 4 days ago

Looks like it's pulling in an old version of the dalmatian package. Note that this was explicitly fixed in a 2022 patch.

I would recommend updating to the latest version of Dalmatian by installing the package directly from GitHub, i.e.

pip install git+https://github.com/getzlab/dalmatian.git
npechl commented 3 days ago

Nope unfortunately I am getting the same error.

Would it be possible to provide a .yaml file of the environment in which you are running the tool?