首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AI 100测试人脸检测API练习

AI 100测试人脸检测API练习
EN

Stack Overflow用户
提问于 2020-11-30 13:00:07
回答 1查看 66关注 0票数 0

错误消息嗨我正在做这个练习测试这个链接https://learn.microsoft.com/en-us/learn/modules/identify-faces-with-computer-vision/8-test-face-detection?pivots=python中给出的这个页面中的人脸检测API

当我在Python3.5.3 64位上执行中给出的命令时,我会收到一个错误,它说在这个版本中不支持from关键字。我已经尝试过Python3.7.4和3.8.6,在那里我也得到了同样的错误。

代码语言:javascript
复制
import os
from msrest.authentication import CognitiveServicesCredentials
from azure.cognitiveservices.vision.face import FaceClient

错误消息

代码语言:javascript
复制
At line:2 char:1
+ from msrest.authentication import CognitiveServicesCredentials
+ ~~~~
The 'from' keyword is not supported in this version of the language.
At line:3 char:1
+ from azure.cognitiveservices.vision.face import FaceClient
+ ~~~~
The 'from' keyword is not supported in this version of the language.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ReservedKeywordNotAllowed

请建议如何解决这个问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-12-01 09:00:31

似乎您正在为VSCode使用Python扩展。

因为它只是一个运行在PowerShell上的解释器,所以仍然需要在命令前面加上python才能工作,比如Visual代码中的python script.py

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65074075

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档