成功解决SyntaxError: future feature annotations is not defined
•
Python
成功解决SyntaxError: future feature annotations is not defined
目录
解决问题
解决思路
解决方法
T1、Anaconda下安装python3.7
T2、临时将以下注释掉也可以
解决问题
SyntaxError: future feature annotations is not defined
解决思路
语法错误:没有定义future feature注释
解决方法
实际上是python版本不对,该语法需要在python3.7以上,而当前版本在python3.6所以导致此错误!
T1、Anaconda下安装python3.7
conda install python==3.7.0
T2、临时将以下注释掉也可以
如果因为无法及时安装,临时将以下注释掉也可以运行当前代码
# from __future__ import annotations
本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/f776284139.html
