Cannot create the virtual environment using py.yml

I tried to create a local virtual environment using the yml file provided by running “conda env create -f py.yml” but I get the following error:

Solving environment: failed


  • lightgbm==3.0.0=py38h950e882_0
  • python==3.8.5=h1103e12_8_cpython
  • pytorch==1.6.0=py3.8_cuda10.2.89_cudnn7.6.5_0
  • tensorflow=2.3
  • xgboost==1.2.0=py38h950e882_0
  • scipy==1.5.2=py38h8c5af15_0
  • pandas==1.1.2=py38h950e882_0
  • scikit-learn==0.23.2=py38hee58b96_0

I’m running MacOS Catalina 10.15.7 with Conda 4.9.2. Anybody else having the same issue?

I suspect this is because you are trying to create a local environment directly on your mac. I believe py.yml is specifying specific linux package version (the docker file will run a virtual linux system on your computer).

I haven’t tried it myself, but you might try and remove the “=py38h950e882_0” bits from the py.yml file and see if it helps.


You are right, it seems to be the reason why.
I tried your technique and it almost worked. I still had an issue with Tensorflow 2.3 so I tried to change it to a lower version but still had conflicts… so I ended up creating my own virtual environment for now. Thank you for your help!

Same problem here on my mac. No way to successfully build the environment using the yml (even using the pip notation, it gives conflict errors) so I had to manually create the env (omitting the libs I don’t use)

Thanks @chrka, this is a good approach. The reason we leave those version specifications is for reproducibility within the container, though it’s possible that is overkill.

In general, the supported local environment is using Docker but we understand for convenience reasons it may be easier to just create a local Python environment.

1 Like