这是我的环境yml文件:-
# Conda environment specification. The dependencies defined in this file will
# be automatically provisioned for runs with userManagedDependencies=False.
# Details about the Conda environment file format:
# https://conda.io/docs/user-guide/tasks/manage-environments.html#create-env-file-manually
name: project_environment
dependencies:
# The python interpreter version.
# Currently Azure ML only supports 3.5.2 and later.
- python
- pip
- pip:
# Required packages for AzureML execution, history, and data preparation.
- azureml-defaults
- scikit-learn
- numpy
- azureml-monitoring
- cython
- setuptools_rust
它在以下代码上失败了:
-
deployment_config = AksWebservice.deploy_configuration(auth_enabled=False, collect_model_data=True, enable_app_insights=True, cpu_cores = 2, memory_gb = 2)
aks_target = AksCompute(ws,aks_name)
(On below line getting error)
service = Model.deploy(ws, service_name, [model], inference_config, deployment_config, aks_target)
service.wait_for_deployment(show_output = True)
当setuptools未安装或未安装在同一路径中时,也会出现类似的问题。您的setup.py文件需要setuptools。卸载和安装可能会有所帮助,它解决了我的问题。
pip uninstall setuptools
然后:
pip install setuptools
此外,有时pip版本也会导致此问题。
pip3 install -U pip