bioinfo-chru-strasbourg / vcf2circos

python plotly Circos from VCF
GNU Affero General Public License v3.0
32 stars 8 forks source link

Error : cannot import name 'CSS3_HEX_TO_NAMES' from 'webcolors' #44

Open tomgutman opened 4 months ago

tomgutman commented 4 months ago

Hi,

I installed vcf2circos via mamba mamba create --name vcf2circos -c bioconda vcf2circos

After loading the environement I got the following error :

vcf2circos -h
Traceback (most recent call last):
  File "/mnt/beegfs/userdata/t_gutman/miniforge3/envs/vcf2circos/bin/vcf2circos", line 6, in <module>
    from vcf2circos.__main__ import main
  File "/mnt/beegfs/userdata/t_gutman/miniforge3/envs/vcf2circos/lib/python3.12/site-packages/vcf2circos/__main__.py", line 27, in <module>
    from fig import Figure
  File "/mnt/beegfs/userdata/t_gutman/miniforge3/envs/vcf2circos/lib/python3.12/site-packages/vcf2circos/./fig.py", line 21, in <module>
    from webcolors import CSS3_HEX_TO_NAMES, hex_to_rgb
ImportError: cannot import name 'CSS3_HEX_TO_NAMES' from 'webcolors' (/mnt/beegfs/userdata/t_gutman/miniforge3/envs/vcf2circos/lib/python3.12/site-packages/webcolors/__init__.py)

Would you have a fix or a workaround using mamba ?

Thanks Tom

JbaptisteLam commented 4 months ago

Hi,

It's due to the version of webcolors library, the conda recipe is not up to date with the latest release, Try to install it in your mamba env with pip from the setup.cfg recipe, mamba create -n vcf2circos python==3.10.13 mamba activate vcf2circos go inside the repository and pip install -e .

Best,

Jean-Baptiste