Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Conda so much slower with yml file?

Tags:

python

conda

I am trying to re-create an environment across different OS. Using conda env export --from-history, I created the following yml file:

name: mlflow_env
channels:
  - conda-forge
dependencies:
  - numpy
  - lightgbm
  - squarify
  - holidays
  - lunardate
  - lunarcalendar
  - sqlalchemy
  - pandas
  - geopy
  - pgeocode
  - psycopg2
  - cython
  - scikit-learn
  - mlflow
  - pyarrow

Once I run conda env create --file conda_lt.yml python=3.9 on any of my two systems, it takes hours to solve the environment, which it eventually solves.

However if I try to run conda create -c conda-forge -n mlflow_env numpy lightgbm squarify holidays lunardate lunarcalendar sqlalchemy pandas geopy pgeocode psycopg2 cython scikit-learn mlflow pyarrow, solving the environment takes less than 30 seconds.

In my understanding the two commands should really result in the same environment, so I am wondering what is the difference and why the yml installation is so much slower. Naturally, any suggestion to make the yml installation as quick as the other is welcomed.

like image 770
non87 Avatar asked Dec 18 '25 16:12

non87


1 Answers

You can try this:

conda update conda
conda update conda-build
conda install -n base conda-libmamba-solver
conda config --set solver libmamba

My answer is based on the issue raised in Conda's issue tracker.

like image 71
Chiang Lucca Avatar answered Dec 21 '25 07:12

Chiang Lucca



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!