简体   繁体   English

错误 conda.core.link:_execute(502): 安装包 'conda-forge::astor-0.7.1-py_0' 时出错

[英]ERROR conda.core.link:_execute(502): An error occurred while installing package 'conda-forge::astor-0.7.1-py_0'

I am trying to follow a Python tutorial and I have been able to execute almost everything, until the point of Deploying an endpoint to Azure with python.我正在尝试遵循 Python 教程,并且我已经能够执行几乎所有内容,直到使用 python 将端点部署到 Azure 为止。

In order to give some context I have uploaded the scripts to my git account: https://github.com/levalencia/MLTutorial为了提供一些上下文,我已将脚本上传到我的 git 帐户: https : //github.com/levalencia/MLTutorial

File 1 and 2 Work perfectly fine文件 1 和 2 工作得很好

However the following section in File 3 fails:但是文件 3 中的以下部分失败:

%%time
from azureml.core.webservice import Webservice
from azureml.core.model import InferenceConfig

inference_config = InferenceConfig(runtime= "python", 
                                   entry_script="score.py",
                                   conda_file="myenv.yml")

service = Model.deploy(workspace=ws, 
                       name='keras-mnist-svc2', 
                       models=[amlModel], 
                       inference_config=inference_config, 
                       deployment_config=aciconfig)

service.wait_for_deployment(show_output=True)

with below error:有以下错误:

ERROR - Service deployment polling reached non-successful terminal state, current service state: Transitioning
Operation ID: 8353cad2-4218-450a-a03b-df418725acb1
More information can be found here: https://machinelearnin1143382465.blob.core.windows.net/azureml/ImageLogs/8353cad2-4218-450a-a03b-df418725acb1/build.log?sv=2018-03-28&sr=b&sig=UKzefxIrm3l7OsXxj%2FT4RsvUfAuhuaBwaz2P4mJu7vY%3D&st=2020-03-11T12%3A23%3A33Z&se=2020-03-11T20%3A28%3A33Z&sp=r
Error:
{
  "code": "EnvironmentBuildFailed",
  "statusCode": 400,
  "message": "Failed Building the Environment."
}

ERROR - Service deployment polling reached non-successful terminal state, current service state: Transitioning
Operation ID: 8353cad2-4218-450a-a03b-df418725acb1
More information can be found here: https://machinelearnin1143382465.blob.core.windows.net/azureml/ImageLogs/8353cad2-4218-450a-a03b-df418725acb1/build.log?sv=2018-03-28&sr=b&sig=UKzefxIrm3l7OsXxj%2FT4RsvUfAuhuaBwaz2P4mJu7vY%3D&st=2020-03-11T12%3A23%3A33Z&se=2020-03-11T20%3A28%3A33Z&sp=r
Error:
{
  "code": "EnvironmentBuildFailed",
  "statusCode": 400,
  "message": "Failed Building the Environment."
}

When I download the logs, I got this:当我下载日志时,我得到了这个:

wheel-0.34.2         | 24 KB     |            |   0% [0m[91m
wheel-0.34.2         | 24 KB     | ########## | 100% [0m
Downloading and Extracting Packages
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... failed
[91m
ERROR conda.core.link:_execute(502): An error occurred while installing package 'conda-forge::astor-0.7.1-py_0'.
FileNotFoundError(2, "No such file or directory: '/azureml-envs/azureml_6abde325a12ccdba9b5ba76900b99b56/bin/python3.6'")
Attempting to roll back.

[0mRolling back transaction: ...working... done
[91m
FileNotFoundError(2, "No such file or directory: '/azureml-envs/azureml_6abde325a12ccdba9b5ba76900b99b56/bin/python3.6'")


[0mThe command '/bin/sh -c ldconfig /usr/local/cuda/lib64/stubs && conda env create -p /azureml-envs/azureml_6abde325a12ccdba9b5ba76900b99b56 -f azureml-environment-setup/mutated_conda_dependencies.yml && rm -rf "$HOME/.cache/pip" && conda clean -aqy && CONDA_ROOT_DIR=$(conda info --root) && rm -rf "$CONDA_ROOT_DIR/pkgs" && find "$CONDA_ROOT_DIR" -type d -name __pycache__ -exec rm -rf {} + && ldconfig' returned a non-zero code: 1
2020/03/11 12:28:11 Container failed during run: acb_step_0. No retries remaining.
failed to run step ID: acb_step_0: exit status 1

Run ID: cb3 failed after 2m21s. Error: failed during run, err: exit status 1

Update 1:更新 1:

I tried to run: conda list --name base conda我试图运行: conda list --name base conda

inside the notebook and I got this:在笔记本里面,我得到了这个:

 # packages in environment at /anaconda:
    #
    # Name                    Version                   Build  Channel
    _anaconda_depends         2019.03                  py37_0  
    anaconda                  custom                   py37_1  
    anaconda-client           1.7.2                    py37_0  
    anaconda-navigator        1.9.6                    py37_0  
    anaconda-project          0.8.4                      py_0  
    conda                     4.8.2                    py37_0  
    conda-build               3.17.6                   py37_0  
    conda-env                 2.6.0                         1  
    conda-package-handling    1.6.0            py37h7b6447c_0  
    conda-verify              3.1.1                    py37_0  

    Note: you may need to restart the kernel to use updated packages.

However in the deployment log I got this:但是在部署日志中我得到了这个:

Solving environment: ...working... 
done
[91m

==> WARNING: A newer version of conda exists. <==
  current version: 4.5.11
  latest version: 4.8.2

Please update conda by running

    $ conda update -n base -c defaults conda

Unfortunately there seems to an issue with this version of Conda (4.5.11).不幸的是,此版本的 Conda (4.5.11) 似乎存在问题。 To complete this task in the tutorial, you can just update the dependency for Tensorflow and Keras to be from pip and not conda .要在本教程中完成此任务,您只需将 Tensorflow 和 Keras 的依赖项更新为来自pip而不是conda There are reasons why this is less than ideal for a production environment.这对于生产环境来说不太理想是有原因的。 The Azure ML documentation states : Azure ML 文档指出

"If your dependency is available through both Conda and pip (from PyPi), use the Conda version, as Conda packages typically come with pre-built binaries that make installation more reliable." “如果您的依赖项可通过 Conda 和 pip(来自 PyPi)获得,请使用 Conda 版本,因为 Conda 软件包通常带有使安装更可靠的预构建二进制文件。”

In this case though, if you update the following code block:在这种情况下,如果您更新以下代码块:

from azureml.core.conda_dependencies import CondaDependencies 

myenv = CondaDependencies()
myenv.add_conda_package("tensorflow")
myenv.add_conda_package("keras")

with open("myenv.yml","w") as f:
    f.write(myenv.serialize_to_string())

# Review environment file
with open("myenv.yml","r") as f:
    print(f.read())

To be the following:如下:

from azureml.core.conda_dependencies import CondaDependencies 

myenv = CondaDependencies()
myenv.add_pip_package("tensorflow==2.0.0")
myenv.add_pip_package("azureml-defaults")
myenv.add_pip_package("keras")

with open("myenv.yml", "w") as f:
    f.write(myenv.serialize_to_string())

with open("myenv.yml", "r") as f:
    print(f.read())

The tutorial should be able to be completed.教程应该可以完成。 Let me know if any of this does not work for you once this update has been made.完成此更新后,如果其中任何一项对您不起作用,请告诉我。

I have also reported this issue to Microsoft (in regards to the Conda version).我也向微软报告了这个问题(关于 Conda 版本)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装 conda 包时出错:conda.core.link:_execute(696):安装包“conda-forge::qt-5.9.7-h506e8af_3”时出错 - Error installing conda packages: conda.core.link:_execute(696): An error occurred while installing package 'conda-forge::qt-5.9.7-h506e8af_3' 更新时的Conda错误:`conda.core.link:_execute(637):安装包&#39;None&#39;时发生错误。 Asse田()` - Conda error on update: `conda.core.link:_execute(637): An error occurred while installing package 'None'. AssertionError()` 错误 conda.core.link:_execute(699): 安装包 &#39;defaults::openssl-1.1.1l-h2bbff1b_0&#39; 时出错 - ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::openssl-1.1.1l-h2bbff1b_0' 错误 conda.core.link:_execute(698):安装包“defaults::icu-58.2-ha925a31_3”时出错 - ERROR conda.core.link:_execute(698): An error occurred while installing package 'defaults::icu-58.2-ha925a31_3' 错误 conda.core.link:_execute(699): 安装包“defaults::qt-5.9.7-vc14h73c81de_0”时出错。 回滚事务:完成 - ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::qt-5.9.7-vc14h73c81de_0'. Rolling back transaction: done 错误 conda.core.link:_execute(700): 安装 package 'defaults::qt-5.9.7-vc14h73c81de_0' 时出错 - ERROR conda.core.link:_execute(700): An error occurred while installing package 'defaults::qt-5.9.7-vc14h73c81de_0' 错误 conda.core.link:_execute(701):更新 conda 包时出错 - ERROR conda.core.link:_execute(701): An error occured while updating conda packages 克隆 conda env 失败:错误 conda.core.link:_execute(543) - Cloning conda env fails: error conda.core.link:_execute(543) 安装conda-forge mlxtend-安装mlxtend时出错-权限被拒绝 - Install conda-forge mlxtend - Error in installing mlxtend - Permission Denied Julia 中的 PyCall 构建错误和 conda.core.link 错误 - PyCall Build Error and conda.core.link Error in Julia
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM