Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export conda yml environment file without package version alphanumeric text

As a newbie in python, I have successfully exported my project environment into a yml file so as to share so far. See sample here

name: climate

channels:

  • conda-forge
  • defaults

dependencies:

  • affine=2.3.0=py_0
  • bokeh=2.4.2=py310h5588dad_0

However, I wish to have the dependencies without the alphanumeric text following the package versions. I like to have -bokeh=2.4.2 not bokeh=2.4.2=py310h5588dad_0.

like image 257
fnOcansey Avatar asked Jun 17 '26 10:06

fnOcansey


1 Answers

Add the --no-builds flag when you're exporting the environment.

    conda env export --no-builds > environment.yml
like image 98
Corrine Avatar answered Jun 20 '26 11:06

Corrine