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

Windows下通过YAML创建Conda环境时遇PackagesNotFoundError

问题根源分析

你使用的environment.yml是Linux平台导出的配置文件,其中包含大量Linux专属的系统依赖(比如ld_impl_linux-64、libgcc-ng、libgomp等),这些包在Windows的conda渠道中根本不存在,这才是报错的核心原因,并非单纯的版本匹配问题。

解决方案

方案1:修改配置文件,保留跨平台核心依赖

直接编辑environment.yml,删除Linux专属依赖,只保留跨平台的基础包,让conda自动适配Windows环境:

修改后的environment.yml内容:

name: automoldesigner
channels:
  - defaults
  - conda-forge
dependencies:
  - python=3.9.*
  - pip=23.*
  - setuptools
  - wheel
  - pip:
    - aiohttp==3.8.5
    - aiohttp-cors==0.7.0
    - aiosignal==1.3.1
    - async-timeout==4.0.3
    - attrs==23.1.0
    - autogluon-common==0.8.2
    - autogluon-core==0.8.2
    - autogluon-features==0.8.2
    - autogluon-tabular==0.8.2
    - blessed==1.20.0
    - blis==0.7.10
    - boto3==1.28.30
    - botocore==1.31.30
    - cachetools==5.3.1
    - catalogue==2.0.9
    - catboost==1.2
    - certifi==2023.7.22
    - charset-normalizer==3.2.0
    - click==8.1.7
    - cloudpickle==2.2.1
    - colorful==0.5.5
    - confection==0.1.1
    - contourpy==1.1.0
    - cycler==0.11.0
    - cymem==2.0.7
    - descriptastorus==2.6.1
    - dimorphite-dl==1.3.2
    - distlib==0.3.7
    - fastai==2.7.12
    - fastcore==1.5.29
    - fastdownload==0.0.7
    - fastprogress==1.0.3
    - filelock==3.12.2
    - fonttools==4.42.1
    - frozenlist==1.4.0
    - future==0.18.3
    - google-api-core==2.11.1
    - google-auth==2.22.0
    - googleapis-common-protos==1.60.0
    - gpustat==1.1
    - grpcio==1.50.0
    - hyperopt==0.2.7
    - idna==3.4
    - importlib-resources==6.0.1
    - jinja2==3.1.2
    - jmespath==1.0.1
    - joblib==1.3.2
    - jsonschema==4.19.0
    - jsonschema-specifications==2023.7.1
    - kiwisolver==1.4.4
    - langcodes==3.3.0
    - lightgbm==3.3.5
    - markupsafe==2.1.3
    - matplotlib==3.7.2
    - molvs==0.1.1
    - msgpack==1.0.5
    - multidict==6.0.4
    - murmurhash==1.0.9
    - networkx==3.1
    - numpy==1.25.2
    - nvidia-cublas-cu11==11.10.3.66
    - nvidia-cuda-nvrtc-cu11==11.7.99
    - nvidia-cuda-runtime-cu11==11.7.99
    - nvidia-cudnn-cu11==8.5.0.96
    - nvidia-ml-py==12.535.77
    - opencensus==0.11.2
    - opencensus-context==0.1.3
    - packaging==23.1
    - pandas==1.5.3
    - pandas-flavor==0.6.0
    - pathy==0.10.2
    - pillow==10.0.0
    - platformdirs==3.10.0
    - plotly==5.16.1
    - preshed==3.0.8
    - prometheus-client==0.17.1
    - protobuf==4.24.1
    - psutil==5.9.5
    - py-spy==0.3.14
    - py4j==0.10.9.7
    - pyasn1==0.5.0
    - pyasn1-modules==0.3.0
    - pydantic==1.10.12
    - pyparsing==3.0.9
    - pyside6==6.5.2
    - pyside6-addons==6.5.2
    - pyside6-essentials==6.5.2
    - python-dateutil==2.8.2
    - python-graphviz==0.20.1
    - pytz==2023.3
    - pyyaml==6.0.1
    - ray==2.3.1
    - rdkit==2023.3.3
    - referencing==0.30.2
    - requests==2.31.0
    - rpds-py==0.9.2
    - rsa==4.9
    - s3transfer==0.6.2
    - scikit-learn==1.2.2
    - scipy==1.11.2
    - shiboken6==6.5.2
    - six==1.16.0
    - smart-open==6.3.0
    - spacy==3.6.1
    - spacy-legacy==3.0.12
    - spacy-loggers==1.0.4
    - srsly==2.4.7
    - tabulate==0.9.0
    - tenacity==8.2.3
    - tensorboardx==2.6.2.2
    - thinc==8.1.12
    - threadpoolctl==3.2.0
    - torch==1.13.1
    - torchvision==0.14.1
    - tqdm==4.66.1
    - typer==0.9.0
    - typing-extensions==4.7.1
    - urllib3==1.26.16
    - virtualenv==20.24.3
    - wasabi==1.1.2
    - wcwidth==0.2.6
    - xarray==2023.8.0
    - xgboost==1.7.6
    - yarl==1.9.2
    - zipp==3.16.2

执行以下命令创建环境:

# 删除已创建的失败环境(如果存在)
conda env remove -n automoldesigner
# 创建新环境
conda env create -f environment.yml

方案2:手动创建基础环境,再安装pip依赖

如果方案1仍有问题,可先搭建干净的Python环境,再单独安装pip依赖:

  1. 创建基础环境:
conda create -n automoldesigner python=3.9 pip setuptools wheel -y
  1. 激活环境:
conda activate automoldesigner
  1. 将原配置中pip:下的所有依赖复制到requirements.txt文件,执行安装:
pip install -r requirements.txt
关键提示
  • 必须删除_libgcc_mutex、ld_impl_linux-64等Linux专属依赖,Windows系统不需要这些包。
  • 锁定Python大版本(如3.9.*)而非具体小版本,让conda自动匹配Windows渠道的兼容版本。
  • 添加conda-forge渠道,它对Windows平台的科学计算包支持更完善。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.18 05:07:03