gpt4 book ai didi

python - 无法在 vscode 中导入 azureml

转载 作者:行者123 更新时间:2023-12-03 06:07:25 25 4
gpt4 key购买 nike

我已经安装了 python 3.8,从 vscode 终端创建了一个 env,并且似乎已成功安装 azureml,如下所示:

C:\Python38\python.exe -m venv tempml
tempml\scripts\activate
pip install azureml-core

然后我进入 python 并输入

import azureml

但我收到以下错误:ModuleNotFoundError:没有名为“azureml”的模块

如果我返回终端并输入

pip show azureml-core

我确实可以看到它:

Name: azureml-core
Version: 1.53.0
Summary: Azure Machine Learning core packages, modules, and classes
Home-page: https://docs.microsoft.com/python/api/overview/azure/ml/?view=azure-ml-py
Author: Microsoft Corp
Author-email: None
License: https://aka.ms/azureml-sdk-license
Location: c:\python38\tempml\lib\site-packages
Requires: docker, msal, azure-common, paramiko, msrestazure, azure-mgmt-resource, msrest, PyJWT, azure-graphrbac, azure-core, ndg-httpsclient, contextlib2, jmespath, backports.tempfile, adal, argcomplete, urllib3, azure-mgmt-network, cryptography, knack, pkginfo, python-dateutil, jsonpickle, azure-mgmt-keyvault, azure-mgmt-containerregistry, azure-mgmt-storage, humanfriendly, azure-mgmt-authorization, pathspec, pytz, msal-extensions, requests, pyopenssl, packaging, SecretStorage
Required-by:

如果有人可以提供帮助,我们将不胜感激。谢谢

最佳答案

您需要确保您使用的解释器安装了 azureml 模块。它出现在右下角,点击它可以切换解释器,选择正确解释器。

enter image description here

还要确保使用 python 扩展执行脚本

enter image description here

关于python - 无法在 vscode 中导入 azureml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/77183132/

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