Error creating a Python environment from an exported environment file.

Q: I exported a python environment that I have on my local system using the 'conda env export > environment_name.yml' command and transferred the file to my home directory but when I try to create the env on the CLA servers by loading the python/conda module and then entering, the 'conda env -create -f environment_name.yml' command, I am getting an error. What can I do to fix this?

A: On your local host, try creating the .yml file with the --no-builds option (conda env export –no-builds environment_name.yml), transfer the file to your home directory, and create the environment using the new file (conda env create -f environment_name.yml). If you are still getting errors, there may be some problematic packages in your .yml file that will need to be installed by hand. If the error has a 'ResolvePackageNotFound:' line followed by a list of packages, copy the .yml to environment_name.ORIG.yml and then edit the environment_name.yml file to delete the packages listed in the error. Create the environment as before, activate it, and then install the problematic packages manually, using either conda or pip.

If that doesn't work, and/or if the environment on your local host has a long list of packages, try creating a barebones conda environment, activate it, and then install only those packages that you will need in the new environment.