last_novice 2022-01-24 00:07 采纳率: 100%
浏览 8
已结题

jupter中调用powershell连接Azaccount时报错

自学Microsoft提供的AutonomousDrivingCookbook

代码取自GitHub:https://github.com/microsoft/AutonomousDrivingCookbook
在进行Step 0 - Set up the Cluster中,需安装Azure powershell,
从GitHub下载powershell7.13版本后https://github.com/PowerShell/PowerShell/releases/tag/v7.1.3
并按照Microsoft的文档安装powershellget及Azure module
powershellget:https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.2
Azure module:https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-7.1.0
运行时返回值为:64

相关代码

以下为这一个block的注释:
We have a custom image that has the proper drivers installed to run AirSim. To create this image, we will run a powershell script that will copy the image from our storage account to your storage account. Ensure that you have the latest version of the AzCopy utility installed and in your path (i.e. running 'azcopy' at the command line should yield the help page). In addition, ensure that you have the latest version of Azure Powershell installed. This command can take up to an hour to run.
我们有一个自定义图像,有适当的驱动程序安装运行AirSim。要创建这个映像,我们将运行一个powershell脚本,该脚本将把映像从我们的存储帐户复制到您的存储帐户。确保你有最新版本的AzCopy实用程序安装在你的路径(即在命令行运行' AzCopy '应该会产生帮助页面)。此外,请确保安装了最新版本的Azure Powershell。运行该命令可能需要一个小时。

os.system('F:\\AutonomousDrivingCookbook-master\\powershell7-13\\A.exe ".\\CreateImage.ps1 -subscriptionId {0} -storageAccountName {1} -storageAccountKey {2} -resourceGroupName {3}'\
          .format(NOTEBOOK_CONFIG['subscription_id'], NOTEBOOK_CONFIG['storage_account_name'], NOTEBOOK_CONFIG['storage_account_key'], NOTEBOOK_CONFIG['resource_group_name']))

F:\AutonomousDrivingCookbook-master\powershell7-13\A.exe是我存放的powershell的路径和名称

以下是GitHub下载后此部分的原始代码:

os.system('powershell.exe ".\\CreateImage.ps1 -subscriptionId {0} -storageAccountName {1} -storageAccountKey {2} -resourceGroupName {3}'\
          .format(NOTEBOOK_CONFIG['subscription_id'], NOTEBOOK_CONFIG['storage_account_name'], NOTEBOOK_CONFIG['storage_account_key'], NOTEBOOK_CONFIG['resource_group_name']))
运行结果及报错内容

运行结果如下:

img

另外寻求实操过此GitHub代码的朋友
https://github.com/microsoft/AutonomousDrivingCookbook

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 2月1日
    • 创建了问题 1月24日

    悬赏问题

    • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
    • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
    • ¥15 绘制多分类任务的roc曲线时只画出了一类的roc,其它的auc显示为nan
    • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号
    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?