ben-j-barlow / clustree

In development: Visualize clusterings at different resolutions
GNU General Public License v3.0
2 stars 1 forks source link

problem about install #12

Open jinyuanchun opened 9 months ago

jinyuanchun commented 9 months ago

After I installed, there was an error。How to handle it?

import sys
sys.path.append('/hsfscqjf2/ST_CQ/Reference/software/envs/clustree/lib/python3.9/site-packages/')

from clustree import clustree

error:

TypeError                                 Traceback (most recent call last)
Cell In[10], line 4
      1 import sys
      2 sys.path.append('/hsfscqjf2/ST_CQ/Reference/software/envs/clustree/lib/python3.9/site-packages/')
----> 4 from clustree import clustree

File /hsfscqjf2/ST_CQ/Reference/software/envs/clustree/lib/python3.9/site-packages/clustree/__init__.py:1
----> 1 from clustree._graph import clustree
      3 __all__ = [
      4     "clustree",
      5 ]

File /hsfscqjf2/ST_CQ/Reference/software/envs/clustree/lib/python3.9/site-packages/clustree/_graph.py:5
      1 from typing import Optional
      3 from networkx import DiGraph
----> 5 from clustree._clustree_typing import (
      6     CMAP_TYPE,
      7     COLOR_AGG_TYPE,
      8     DATA_INPUT_TYPE,
      9     EDGE_COLOR_TYPE,
     10     IMAGE_INPUT_TYPE,
     11     MIN_CLUSTER_NUMBER_TYPE,
     12     NODE_COLOR_TYPE,
     13     ORIENTATION_INPUT_TYPE,
     14     OUTPUT_PATH_TYPE,
     15 )
     16 from clustree._config import ClustreeConfig
     17 from clustree._draw import draw_clustree

File /hsfscqjf2/ST_CQ/Reference/software/envs/clustree/lib/python3.9/site-packages/clustree/_clustree_typing.py:11
      5 import pandas as pd
      7 OUTPUT_PATH_TYPE = Optional[Union[str, Path]]
      9 NODE_CONFIG_TYPE = [
     10     int,  # (K, k) hashed
---> 11     dict[str, Any],  # 'color': XYZ, 'samples': 75, 'image': np.array
     12 ]
     14 EDGE_CONFIG_TYPE = [
     15     int,  # (K, k_start, k_end) hashed
     16     dict[str, Any],  # 'color', 'samples', 'alpha', 'start', 'end', 'res'
     17 ]
     19 DATA_INPUT_TYPE = Union[str, Path, pd.DataFrame]

TypeError: 'type' object is not subscriptable