只說正確方法
1)先把 channel 配好(只需做一次)
conda config --add channels conda-forge
conda config --add channels bioconda
conda config --add channels defaults
conda config --set channel_priority strict
2)創(chuàng)建獨立環(huán)境(建議 Python=3.10 or 3.11)
這樣能最大概率拿到現(xiàn)成編譯包,避免本地編譯出錯;MACS2 目前至少需要 Python≥3.6
conda create -n macs2 -c conda-forge -c bioconda python=3.10
3)激活macs2環(huán)境
conda activate macs2
4) 用pip裝
# 3) 用 pip 重新裝(先升級 pip)
python -m pip install -U pip setuptools wheel
# 4) 安裝 macs2(建議先裝一個穩(wěn)定版本;不行再換版本)
python -m pip install "macs2==2.2.9.1"
# 如果你想讓它自動裝最新版:
# python -m pip install macs2
5) 驗證
macs2 --version
python -c "import MACS2; print(MACS2.__file__)"

MACS2