gpt4 book ai didi

python - 在 Azure ML 中安装 Python 包?

转载 作者:行者123 更新时间:2023-12-02 15:17:23 25 4
gpt4 key购买 nike

类似的问题here但现在在 Python 包上。目前,Azure ML 中缺少 CVXPY。我还尝试让其他求解器(例如 GLPK、CLP 和 COINMP)在 Azure ML 中工作。

如何在 Azure ML 中安装 Python 包?

<小时/>

有关尝试安装 Azure ML 中未找到的 Python 包的更新。

I did as instructed by Peter Pan but I think the 32bits CVXPY files are wrong for the Anaconda 4 and Python 3.5 in Azure ML, logs and errors are here.

[Information]         Running with Python 3.5.1 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)]

enter image description here

enter image description here

enter image description here

使用 win_amd64 文件更新 2(粘贴 here )

[Information]         Extracting Script Bundle.zip to .\Script Bundle
[Information] File Name Modified Size
[Information] cvxopt-1.1.9-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:34 1972074
[Information] __MACOSX/ 2017-06-07 01:26:28 0
[Information] __MACOSX/._cvxopt-1.1.9-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:34 452
[Information] cvxpy-0.4.10-py3-none-any.whl 2017-06-07 00:25:36 300880
[Information] __MACOSX/._cvxpy-0.4.10-py3-none-any.whl 2017-06-07 00:25:36 444
[Information] ecos-2.0.4-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:40 56522
[Information] __MACOSX/._ecos-2.0.4-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:40 450
[Information] numpy-1.13.0rc2+mkl-cp35-cp35m-win_amd64.whl 2017-06-07 01:25:02 127909457
[Information] __MACOSX/._numpy-1.13.0rc2+mkl-cp35-cp35m-win_amd64.whl 2017-06-07 01:25:02 459
[Information] scipy-0.19.0-cp35-cp35m-win_amd64.whl 2017-06-07 01:05:12 12178932
[Information] __MACOSX/._scipy-0.19.0-cp35-cp35m-win_amd64.whl 2017-06-07 01:05:12 452
[Information] scs-1.2.6-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:34 78653
[Information] __MACOSX/._scs-1.2.6-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:34 449
[Information] [ READING ] 0:00:00
[Information] Input pandas.DataFrame #1:
[Information] Empty DataFrame
[Information] Columns: [1]
[Information] Index: []
[Information] [ EXECUTING ] 0:00:00
[Information] [ WRITING ] 0:00:00

where import cvxpy, import cvxpy-0.4.10-py3-none-any.whl or cvxpy-0.4.10-py3-none-any do not work so

How can I use the following wheel files downloaded from here to use the external Python packages not found in Azure ML?

有关导入 cvxpy 的权限问题的更新(粘贴 here )

 [Error]         ImportError: No module named 'canonInterface'

where the ZIP Bundle is organised a bit differently, the content of each wheel downloaded to a folder and the content having all zipped as a ZIP Bundle.

最佳答案

根据LimitationsTechnical Notes执行Python脚本教程中,添加自定义Python模块的唯一方法是通过zip文件机制来打包模块和所有依赖项。

例如安装CVXPY,如下。

  1. 下载CVXPY的wheel文件及其依赖项如 CVXOPT .
  2. 解压这些wheel文件,并将这些文件与您的脚本一起打包在路径cvxpycvxopt等中作为压缩文件。
  3. 将 zip 文件作为数据集上传并将其用作脚本包。

如果您使用的是 IPython,您还可以尝试通过代码 !pip install cvxpy 安装 Python 包。

还有一些类似的 SO 线程可能对您有帮助,如下所示。

  1. Azure ML Python with Script Bundle cannot import module
  2. How to install a Python package from within IPython?

希望有帮助。

<小时/>

更新:

对于Azure ML的IPython接口(interface),您可以转到NOTEBOOKS选项卡,通过页面底部的ADD TO PROJECT按钮创建笔记本,如下图.

enter image description here

或者您可以直接登录网站https://notebooks.azure.com使用。

关于python - 在 Azure ML 中安装 Python 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44371692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com