Miniconda下scikit-bio与Python 3.5兼容冲突问题求助
Hey there, I’ve run into similar conda dependency headaches before—let’s get this sorted out for you! The core issue here is that the latest version of scikit-bio available on conda requires Python 3.6+, but you’re trying to use Python 3.5 for your dsfdr2 setup. Luckily, there are a few straightforward fixes:
Solution 1: Specify an older, Python 3.5-compatible scikit-bio version in your conda create command
The PyPI info you referenced notes scikit-bio 0.2.3 works with Python 3.4+, and this version is available on conda. Just modify your original command to pin scikit-bio to 0.2.3:
conda create -n dsfdr2 python=3.5 numpy scipy jupyter scikit-learn scikit-bio=0.2.3 statsmodels
This tells conda to pull the exact version of scikit-bio that’s compatible with Python 3.5, avoiding the dependency conflict entirely.
Solution 2: Create the environment first, then install scikit-bio via pip
If conda still throws issues with the pinned version, you can build the base environment without scikit-bio, then use pip to install the compatible version directly:
- Create the environment without scikit-bio:
conda create -n dsfdr2 python=3.5 numpy scipy jupyter scikit-learn statsmodels - Activate the environment:
conda activate dsfdr2 - Install the Python 3.5-compatible scikit-bio version using pip:
pip install scikit-bio==0.2.3
This bypasses conda’s strict dependency checks and lets you install the exact version you need.
Solution 3: Upgrade Python to 3.6 (if dsfdr2 supports it)
If your dsfdr2 code doesn’t strictly require Python 3.5, you can switch to Python 3.6 to use the latest scikit-bio version without conflicts. Run this command instead:
conda create -n dsfdr2 python=3.6 numpy scipy jupyter scikit-learn scikit-bio statsmodels
Just double-check first that the dsfdr2 tool works correctly with Python 3.6—if it does, this is the cleanest long-term fix.
Quick Optional Tip
If you run into slow download speeds on Windows, you can add a domestic conda mirror to speed up package pulls, but that’s only necessary if you’re having trouble fetching dependencies.
内容的提问来源于stack exchange,提问作者pmaes

