You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CentOS7下Conda安装Snakemake遇依赖冲突及JSON解析错误求助

Fixing Snakemake Installation Issues on CentOS 7.3 with Conda

Hey there, let's work through this snakemake installation headache step by step—conda dependency conflicts and JSON parsing errors are super common, but we've got solid fixes to try:

1. Resolve the JSON Parsing Error First

That ValueError: Expecting : delimiter is almost always caused by corrupted conda cache files. Let's clear them out to start fresh:

conda clean --all -y

This command deletes all cached packages and index files, so conda will fetch uncorrupted, up-to-date data next time you run an install.

2. Create a Fresh Conda Environment (Most Reliable Fix)

Your existing environment likely has tangled dependencies, and Python 3.4.5 is quite outdated—newer snakemake releases don't even support Python 3.4 anymore. Let's build a clean environment tailored for snakemake:

  • Create a new environment with a snakemake-compatible Python version (3.6–3.9 work perfectly):
    conda create -n snakemake_env python=3.8 -y
    
  • Activate the new environment (CentOS 7 may require source for older conda versions):
    source activate snakemake_env
    
  • Install snakemake with properly ordered channels (conda-forge first to avoid dependency clashes):
    conda install -c conda-forge -c bioconda snakemake -y
    

3. Fix the Backports Dependency Conflict Directly

If you absolutely need to use your existing environment, try forcing a compatible version of backports.functools_lru_cache that plays nice with snakemake:

conda install -c bioconda -c conda-forge snakemake backports.functools_lru_cache=1.5 -y

Version 1.5 is a known compatible release for older snakemake versions that support Python 3.4.

4. Configure Conda Channel Priority

Misconfigured channel order often leads to pulling incompatible package versions. Set up your channels to prioritize reliability:

conda config --add channels conda-forge
conda config --add channels bioconda
conda config --add channels defaults
conda config --set channel_priority strict

This ensures conda picks packages from the highest-priority channel first, cutting down on cross-channel dependency conflicts.

A quick heads-up: Python 3.4 is end-of-life, so moving to a newer Python version (even just in a conda environment) will save you from tons of future dependency headaches.

内容的提问来源于stack exchange,提问作者Nikita Vlasenko

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:54:18