简体   繁体   中英

creating a conda environment fails on MacOS: ResolvePackageNotFound

I want to set up stable-diffusion on my machine (M1 MacOS), based on these instructions , I'm running:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh 
bash Miniconda3-latest-MacOSX-arm64.sh

I accept the license and confirm the installation location, everything looks good.

Then, when I want to create an environment with conda env create -f environment.yaml , I run into this error:

ResolvePackageNotFound:
  - python=3.8.5
  - cudatoolkit=11.3
  - pip=20.3
  - torchvision=0.12.0

The environment.yaml file contains this:

name: ldm
channels:
  - pytorch
  - defaults
dependencies:
  - python=3.8.5
  - pip=20.3
  - cudatoolkit=11.3
  - pytorch=1.11.0
  - torchvision=0.12.0
  - numpy=1.19.2
  - pip:
    - albumentations==0.4.3
    - diffusers
    - opencv-python==4.1.2.30
    - pudb==2019.2
    - invisible-watermark
    - imageio==2.9.0
    - imageio-ffmpeg==0.4.2
    - pytorch-lightning==1.4.2
    - omegaconf==2.1.1
    - test-tube>=0.7.5
    - streamlit>=0.73.1
    - einops==0.3.0
    - torch-fidelity==0.3.0
    - transformers==4.19.2
    - torchmetrics==0.6.0
    - kornia==0.6
    - -e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
    - -e git+https://github.com/openai/CLIP.git@main#egg=clip
    - -e .

Where do go from here? I was under the impression that conda would install the required dependencies, but I guess not?

The central issue is trying to create a native osx-arm64 environment.

First, use conda-forge channel instead of defaults . 1 Second, native PyTorch packages are only available for pytorch >=1.12 and torchvision >=0.13 . Third, no Apple Silicon systems come with nVidia cards, so cudatoolkit is inappropriate - remove it.

There are probably more issues, but that's a start. Also, you should probably read this thread closely.


[1] : You would have been better off installing a Miniforge variant like Mambaforge, not Miniconda. Conda Forge has been supporting osx-arm64 for nearly two years, so has a much deeper catalog of available packages that defaults channel, which only added support in May.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM