- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我尝试运行 this notebook 中定义的实验时在笔记本中,我在创建 conda env 时遇到错误。执行以下单元格时发生错误:
from azureml.core import Experiment, ScriptRunConfig, Environment
from azureml.core.conda_dependencies import CondaDependencies
from azureml.widgets import RunDetails
# Create a Python environment for the experiment
sklearn_env = Environment("sklearn-env")
# Ensure the required packages are installed (we need scikit-learn, Azure ML defaults, and Azure ML dataprep)
packages = CondaDependencies.create(conda_packages=['scikit-learn','pip'],
pip_packages=['azureml-defaults','azureml-dataprep[pandas]'])
sklearn_env.python.conda_dependencies = packages
# Get the training dataset
diabetes_ds = ws.datasets.get("diabetes dataset")
# Create a script config
script_config = ScriptRunConfig(source_directory=experiment_folder,
script='diabetes_training.py',
arguments = ['--regularization', 0.1, # Regularizaton rate parameter
'--input-data', diabetes_ds.as_named_input('training_data')], # Reference to dataset
environment=sklearn_env)
# submit the experiment
experiment_name = 'mslearn-train-diabetes'
experiment = Experiment(workspace=ws, name=experiment_name)
run = experiment.submit(config=script_config)
RunDetails(run).show()
run.wait_for_completion()
每次运行它时,我总是面临创建 conda env 的问题,如下所示:
Creating conda environment...
Running: ['conda', 'env', 'create', '-p', '/home/azureuser/.azureml/envs/azureml_000000000000', '-f', 'azureml-environment-setup/mutated_conda_dependencies.yml']
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Installing pip dependencies: ...working...
Attempting to clean up partially built conda environment: /home/azureuser/.azureml/envs/azureml_000000000000
Remove all packages in environment /home/azureuser/.azureml/envs/azureml_000000000000:
Creating conda environment failed with exit code: -15
我在互联网上找不到任何有用的东西,这不是唯一失败的脚本。当我尝试运行其他实验时,有时会遇到这个问题。在上述情况下工作的一种解决方案是我将 Pandas 从 pip 移动到 conda 并且它能够创建 coonda env。下面的例子:
# Ensure the required packages are installed (we need scikit-learn, Azure ML defaults, and Azure ML dataprep)
packages = CondaDependencies.create(conda_packages=['scikit-learn','pip'],
pip_packages=['azureml-defaults','azureml-dataprep[pandas]'])
# Ensure the required packages are installed (we need scikit-learn, Azure ML defaults, and Azure ML dataprep)
packages = CondaDependencies.create(conda_packages=['scikit-learn','pip','pandas'],
pip_packages=['azureml-defaults','azureml-dataprep'])
最佳答案
简答
以前完全在你的鞋子里。此代码示例似乎有点过时。使用 this notebook作为引用,您可以尝试以下方法吗?
packages = CondaDependencies.create(
pip_packages=['azureml-defaults','scikit-learn']
)
更长的答案
name: aml_env
dependencies:
- python=3.8
- pip=21.0.1
- pip:
- azureml-defaults
- azureml-dataprep[pandas]
- scikit-learn==0.24.1
conda env create -f environment.yml
创建此环境. environment.yml
像这样的 Azure ML sklearn_env = Environment.from_conda_specification(name = 'sklearn-env', file_path = './environment.yml')
更多上下文
pip install -r requirements.txt
如果该命令出错,则 conda 无法报告错误。
requirements.txt
scikit-learn==0.24.1
azureml-dataprep[pandas]
environment.yml
name: aml_env
dependencies:
- python=3.8
- pip=21.0.1
- pip:
- -rrequirements.txt
关于anaconda - Azure ML 无法创建 conda 环境(退出代码 : -15),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67639665/
尝试使用命令 conda update conda 从终端更新 conda 时出现错误.它在说: Solving environment: failed UnsatisfiableError: The
在 conda 中,当我尝试安装软件包时,出现此错误: CorruptedEnvironmentError: The target environment has been corrupted. C
我想在一个特定的 conda 环境中安装带有 conda 的程序,并能够使用来自所有 conda 环境的相关命令。 我的目标是让学生在任何平台(尤其是 Windows)上安装 Mercurial(加上
我遇到了一个麻烦的问题。 我的 pip 和 /home/xxx/local/anacoda2/bin 的 python 都可以,但是 conda 仍然不起作用。当我在我的 ubuntu16.04 终端
我已经在普通机器上设置了 Conda 环境。它工作正常。我想在一台无法访问互联网的机器上克隆这个环境(我只能通过 SSH 进入)。 我最初的想法是压缩 Conda 留下的包缓存并将其移动到气隙机器上的
我想要两个环境:生产环境是测试环境的严格子集。我如何使用 Conda(或 micromamba)实现这一目标? 测试需要一些不需要捆绑在生产 docker 镜像中的额外实用程序。主要思想是确保生产安装
每次打开终端时都会显示以下代码行。 Traceback (most recent call last): File "", line 3, in ImportError: No module n
我尝试使用以下命令更新 conda: ~$ conda update conda 它输出以下消息: WARNING conda.base.context:use_only_tar_bz2(632):
如何仅列出 conda 中针对特定环境显式安装的软件包?有没有办法做到这一点? 最佳答案 @Sjlver 的评论链接到的页面( https://github.com/conda/conda/issue
conda 文档指定: conda clean [-h] [-y] [--dry-run] [--json] [--debug] [--verbose] [-q] [-a] [-i] [-l] [-t
当我克隆一个 Conda 环境时 conda create --name thenewenv --clone theorigenv 我注意到 theorigenv 的修订历史丢失了 conda act
我在 Conda 环境中安装了一堆软件包,包括带有 NVIDIA 工具包的 docker 容器和一些其他非 python 库。安装占用了大约 10 GB 的磁盘空间。但是当我删除 Conda 环境时,
documentation指出克隆以这种方式工作:conda create --name myclone --clone myenv但是,这将始终默认创建环境 myclone进入我几乎没有磁盘存储空间
这个问题在这里已经有了答案: Why are packages installed rather than just linked to a specific environment? (1 个回答)
How to list package versions available with conda有有用的答案,其中之一在 https://stackoverflow.com/a/47795843/2
后 conda update --all 我无法再启动 spyder。如果我在终端中运行 spyder,我会收到以下错误: /anaconda3/bin/pythonw: line 3: /anaco
对于给定的 conda包,我如何列出依赖它的包? 我最近在一个已经有 MPI (openmpi) 版本的大学集群上安装了 anaconda。 mpich2包和mpi4py与 anaconda 一起安装
创建虚拟环境时可以将路径/Users/nolan/miniconda/envs/更改为另一个路径吗?我希望它特定于我的项目目录。 (正如我们可以使用 virtualenv 所做的那样) $conda
激活 conda 环境时,conda 会记住之前激活的环境。例如,如果没有激活任何环境,则调用 conda activate foo 然后调用 conda deactivate 将导致没有任何环境处于
我使用 PyCharm 创建了一个带有 conda 解释器的项目。 Pycharm自动为其创建conda环境。不久之后,我意识到我想要该项目的另一个地点。因此我删除了项目文件夹。然后我意识到我要删除
我是一名优秀的程序员,十分优秀!