Conda does not create environment from yml file on MacOS

March 24, 2022, at 8:20 PM

I'm trying to create an environment with conda after having installed Miniconda3, on macOS. I am using the conda env create -f SEM1-CB.yml command through terminal but it gives me the following error:

Collecting package metadata (repodata.json): done
Solving environment: failed
  - xz==5.2.5=h62dcd97_1
  - mkl-service==2.4.0=py310h2bbff1b_0
  - numpy-base==1.21.2=py310h0829f74_0
  - libzlib==1.2.11=h8ffe710_1013
  - vc==14.2=hb210afc_5
  - lz4-c==1.9.3=h8ffe710_1
  - numpy==1.21.2=py310hfca59bb_0
  - jpeg==9d=h8ffe710_0
  - mkl_random==1.2.2=py310h4ed8f06_0
  - zlib==1.2.11=h8ffe710_1013
  - libffi==3.4.2=h8ffe710_5
  - mkl==2021.4.0=haa95532_640
  - setuptools==58.5.3=py310h5588dad_0
  - mkl_fft==1.3.1=py310ha0764ea_0
  - ca-certificates==2021.10.26=haa95532_4
  - libtiff==4.3.0=hd413186_2
  - openssl==3.0.0=h8ffe710_2
  - intel-openmp==2021.4.0=haa95532_3556
  - libdeflate==1.8=h8ffe710_0
  - zstd==1.5.0=h6255e5f_0
  - python==3.10.0=hcf16a7b_2_cpython
  - vs2015_runtime==14.29.30037=h902a5da_5
  - lcms2==2.12=h2a16943_0
  - lerc==3.0=h0e60522_0
  - openjpeg==2.4.0=hb211442_1
  - pillow==8.4.0=py310h22f3323_0
  - tk==8.6.11=h8ffe710_1
  - ucrt==10.0.20348.0=h57928b3_0
  - freetype==2.10.4=h546665d_1
  - jbig==2.1=h8d14728_2003
  - libpng==1.6.37=h1d00b33_2
  - sqlite==3.36.0=h8ffe710_2
  - bzip2==1.0.8=h8ffe710_4

The SEM1-CB.yml file is as follows:

name: SEM1-CB
  - conda-forge
  - defaults
  - blas=1.0=mkl
  - bzip2=1.0.8=h8ffe710_4
  - ca-certificates=2021.10.26=haa95532_4
  - freetype=2.10.4=h546665d_1
  - intel-openmp=2021.4.0=haa95532_3556
  - jbig=2.1=h8d14728_2003
  - jpeg=9d=h8ffe710_0
  - lcms2=2.12=h2a16943_0
  - lerc=3.0=h0e60522_0
  - libdeflate=1.8=h8ffe710_0
  - libffi=3.4.2=h8ffe710_5
  - libpng=1.6.37=h1d00b33_2
  - libtiff=4.3.0=hd413186_2
  - libzlib=1.2.11=h8ffe710_1013
  - lz4-c=1.9.3=h8ffe710_1
  - mkl=2021.4.0=haa95532_640
  - mkl-service=2.4.0=py310h2bbff1b_0
  - mkl_fft=1.3.1=py310ha0764ea_0
  - mkl_random=1.2.2=py310h4ed8f06_0
  - numpy=1.21.2=py310hfca59bb_0
  - numpy-base=1.21.2=py310h0829f74_0
  - olefile=0.46=pyh9f0ad1d_1
  - openjpeg=2.4.0=hb211442_1
  - openssl=3.0.0=h8ffe710_2
  - pillow=8.4.0=py310h22f3323_0
  - pip=21.3.1=pyhd8ed1ab_0
  - pysimplegui=4.55.1=pyhd8ed1ab_0
  - python=3.10.0=hcf16a7b_2_cpython
  - python_abi=3.10=2_cp310
  - setuptools=58.5.3=py310h5588dad_0
  - six=1.16.0=pyhd3eb1b0_0
  - sqlite=3.36.0=h8ffe710_2
  - tk=8.6.11=h8ffe710_1
  - tzdata=2021e=he74cb21_0
  - ucrt=10.0.20348.0=h57928b3_0
  - vc=14.2=hb210afc_5
  - vs2015_runtime=14.29.30037=h902a5da_5
  - wheel=0.37.0=pyhd8ed1ab_1
  - xz=5.2.5=h62dcd97_1
  - zlib=1.2.11=h8ffe710_1013
  - zstd=1.5.0=h6255e5f_0
  - pip:
    - click==8.0.3
    - colorama==0.4.4
    - flask==2.0.2
    - itsdangerous==2.0.1
    - jinja2==3.0.3
    - markupsafe==2.0.1
    - pymata4==1.15
    - pyserial==3.5
    - werkzeug==2.0.2

I need to create and activate this environment in order to add it as interpreter on visual studio code. I have tried the procedure on microsoft windows and it works, but I need it to work even on macOS.

Thank you in advance for any help!

Answer 1

In SEM1-CB.yml file you have Windows-specific conda package builds specified, which aren't available in OSX index, hence ends up showing you ResolvePackageNotFound error. Check the screenshot below I took from:

To fix this, when you export your conda environment file in Windows run this command: conda env export --from-history --name env_name > file_name.yml or manually remove build numbers from the file.

Rent Charter Buses Company
Gensim - index_to_key gives numbers instead of words as output

Gensim - index_to_key gives numbers instead of words as output

I'm trying to get 5 most frequent words from word2vec model created from wikipedia dumpI turned this model into KeyedVectors and the code looks like that:

Sending data from html form to python api then send that data to html

Sending data from html form to python api then send that data to html

So i just started working witih python since it was necessary for this project (because the API im using)So i've struggled with this a bit

Parsing CSV datafile with nested string Dictionary

Parsing CSV datafile with nested string Dictionary

I'm trying to use a large amount (20GB, approx 1000 files) of csv data from Telegram collected via Telethon over a couple weeksI collected other data previously, but unfortunately, I completely messed up, used the wrong script and let my collection script...

Apply gradient to a tensor in a sparse way in PyTorch

Apply gradient to a tensor in a sparse way in PyTorch

I have a very large tensor L (millions of elements), from which I gather a relatively small subtensor S (maybe a thousand of elements)