You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're using a YAML for your conda specification, include only one Python version as a dependency
734
+
735
+
**Resources**
736
+
*[CondaDependencies Class v1](https://aka.ms/azureml/environment/conda-dependencies-class)
712
737
713
738
### Python version not supported
714
-
- The Python version provided in the environment definition isn't supported
715
-
- Consider using a newer version of Python
716
-
- See [Python versions](https://aka.ms/azureml/environment/python-versions) and [Python end-of-life dates](https://aka.ms/azureml/environment/python-end-of-life)
739
+
<!--issueDescription-->
740
+
**Potential causes:**
741
+
* You've specified a Python version that is at or near its end-of-life and is no longer supported
742
+
743
+
**Affected areas (symptoms):**
744
+
* Failure in registering your environment
745
+
<!--/issueDescription-->
746
+
747
+
**Troubleshooting steps**
748
+
749
+
Specify a [python version](https://aka.ms/azureml/environment/python-versions) that hasn't reached and isn't nearing its [end-of-life](https://aka.ms/azureml/environment/python-end-of-life)
717
750
718
751
### Python version not recommended
719
-
- The Python version used in the environment definition is at or near its end of life, and should be avoided
720
-
- Consider using a newer version of Python as the specified version will eventually be unsupported
721
-
- See [Python versions](https://aka.ms/azureml/environment/python-versions) and [Python end-of-life dates](https://aka.ms/azureml/environment/python-end-of-life)
752
+
<!--issueDescription-->
753
+
**Potential causes:**
754
+
* You've specified a Python version that is at or near its end-of-life
755
+
756
+
**Affected areas (symptoms):**
757
+
* Failure in registering your environment
758
+
<!--/issueDescription-->
759
+
760
+
**Troubleshooting steps**
761
+
762
+
Specify a [python version](https://aka.ms/azureml/environment/python-versions) that hasn't reached and isn't nearing its [end-of-life](https://aka.ms/azureml/environment/python-end-of-life)
722
763
723
764
### Failed to validate Python version
724
-
- The provided Python version may have been formatted improperly or specified with incorrect syntax
725
-
- See [conda package pinning](https://aka.ms/azureml/environment/how-to-pin-conda-packages)
765
+
<!--issueDescription-->
766
+
**Potential causes:**
767
+
* The provided Python version was formatted improperly or specified with incorrect syntax
768
+
769
+
**Affected areas (symptoms):**
770
+
* Failure in registering your environment
771
+
<!--/issueDescription-->
772
+
773
+
**Troubleshooting steps**
774
+
775
+
*Applies to: Python SDK v1*
776
+
777
+
Use correct syntax to specify a Python version using the SDK
Use correct syntax to specify a Python version in a conda YAML
786
+
787
+
```yaml
788
+
name: project_environment
789
+
dependencies:
790
+
- python=3.8
791
+
- pip:
792
+
- azureml-defaults
793
+
channels:
794
+
- anaconda
795
+
```
796
+
797
+
**Resources**
798
+
* See [conda package pinning](https://aka.ms/azureml/environment/how-to-pin-conda-packages)
726
799
727
800
### *Conda issues*
728
801
### Missing conda dependencies
729
-
- The [environment definition](https://aka.ms/azureml/environment/environment-class-v1)
730
-
has a [PythonSection](https://aka.ms/azureml/environment/environment-python-section)
731
-
that contains a `user_managed_dependencies` bool and a `conda_dependencies` object
732
-
- If `user_managed_dependencies` is set to `True`, you're responsible for ensuring that all the necessary packages are available in the
733
-
Python environment in which you choose to run the script
734
-
- If `user_managed_dependencies` is set to `False` (the default), Azure ML will create a Python environment for you based on `conda_dependencies`.
735
-
The environment is built once and is reused as long as the conda dependencies remain unchanged
736
-
- You'll receive a *"missing conda dependencies"* error when `user_managed_dependencies` is set to `False` and you haven't provided a conda specification.
737
-
- See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
738
-
- See [CondaDependencies class](https://aka.ms/azureml/environment/conda-dependencies-class)
739
-
- See [how to set a conda specification on the environment definition](https://aka.ms/azureml/environment/set-conda-spec-on-environment-definition)
802
+
<!--issueDescription-->
803
+
**Potential causes:**
804
+
* You haven't provided a conda specification in your environment definition, and `user_managed_dependencies` is set to `False` (the default)
805
+
806
+
**Affected areas (symptoms):**
807
+
* Failure in registering your environment
808
+
<!--/issueDescription-->
809
+
810
+
**Troubleshooting steps**
811
+
812
+
*Applies to: Python SDK v1*
813
+
814
+
If you don't want AzureML to create a Python environment for you based on `conda_dependencies,` set `user_managed_dependencies` to `True`
815
+
816
+
```python
817
+
env.python.user_managed_dependencies = True
818
+
```
819
+
* You're responsible for ensuring that all necessary packages are available in the Python environment in which you choose to run the script
820
+
821
+
If you want AzureML to create a Python environment for you based on a conda specification, `conda_dependencies` needs to be populated in your environment definition
822
+
823
+
```python
824
+
from azureml.core.environment import CondaDependencies
825
+
826
+
env = Environment(name="env")
827
+
conda_dep = CondaDependencies()
828
+
conda_dep.add_conda_package("python==3.8")
829
+
env.python.conda_dependencies=conda_dep
830
+
```
831
+
832
+
*Applies to: Azure CLI & Python SDK v2*
833
+
834
+
You must specify a base Docker image for the environment, and the conda environment will be built on top of that image
835
+
* Provide the relative path to the conda file
836
+
* See how to [create an environment from a conda specification](https://aka.ms/azureml/environment/create-env-conda-spec-v2)
837
+
838
+
**Resources**
839
+
* See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
840
+
* See [CondaDependencies class](https://aka.ms/azureml/environment/conda-dependencies-class)
841
+
* See [how to set a conda specification on the environment definition](https://aka.ms/azureml/environment/set-conda-spec-on-environment-definition)
740
842
741
843
### Invalid conda dependencies
742
-
- Make sure the conda dependencies specified in your conda specification are formatted correctly
743
-
- See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
844
+
<!--issueDescription-->
845
+
**Potential causes:**
846
+
* The conda dependencies specified in your environment definition aren't formatted correctly
847
+
848
+
**Affected areas (symptoms):**
849
+
* Failure in registering your environment
850
+
<!--/issueDescription-->
851
+
852
+
**Troubleshooting steps**
853
+
854
+
*Applies to: Python SDK v1*
855
+
856
+
Ensure that `conda_dependencies` is a JSONified version of the conda dependencies YAML structure
857
+
858
+
```json
859
+
"condaDependencies": {
860
+
"channels": [
861
+
"anaconda",
862
+
"conda-forge"
863
+
],
864
+
"dependencies": [
865
+
"python=3.8",
866
+
{
867
+
"pip": [
868
+
"azureml-defaults"
869
+
]
870
+
}
871
+
],
872
+
"name": "project_environment"
873
+
}
874
+
```
875
+
876
+
Conda dependencies can also be specified using the `add_conda_package` method
877
+
878
+
```python
879
+
from azureml.core.environment import CondaDependencies
880
+
881
+
env = Environment(name="env")
882
+
conda_dep = CondaDependencies()
883
+
conda_dep.add_conda_package("python==3.8")
884
+
env.python.conda_dependencies=conda_dep
885
+
```
886
+
887
+
*Applies to: Azure CLI & Python SDK v2*
888
+
889
+
You must specify a base Docker image for the environment, and the conda environment will be built on top of that image
890
+
* Provide the relative path to the conda file
891
+
* See how to [create an environment from a conda specification](https://aka.ms/azureml/environment/create-env-conda-spec-v2)
892
+
893
+
**Resources**
894
+
* See [more extensive examples](https://github.com/Azure/MachineLearningNotebooks/blob/9b1e130d18d3c61d41dc225488a4575904897c85/how-to-use-azureml/training/using-environments/using-environments.ipynb)
895
+
* See [how to create a conda file manually](https://aka.ms/azureml/environment/how-to-create-conda-file)
896
+
* See [CondaDependencies class](https://aka.ms/azureml/environment/conda-dependencies-class)
897
+
* See [how to set a conda specification on the environment definition](https://aka.ms/azureml/environment/set-conda-spec-on-environment-definition)
744
898
745
899
### Missing conda channels
746
900
- If no conda channels are specified, conda will use defaults that might change
0 commit comments