SyntaxError: future feature annotations is not defined

FCN源码出现错误SyntaxError: future feature annotations is not defined,出现错误如下图所示:

然后我在网上找错误是因为python版本的问题,因此需要把python3.6.x换为python3.7.0

1.查看当前python版本
在终端Terminal输入:
$ conda list
回车,就会出现当前环境下的所有库;

往下翻可以看到当前环境下的python版本为3.6.15(这里不用卸载,只需安装新的版本就可以把旧的版本覆盖掉)

2.在当前环境下安装 python3.7.0
在终端Terminal输入
$ pip install python==3.7.0
回车,安装成功;若安装失败会出现下图错误;

在终端Terminal输入
$ conda install python==3.7.0
回车,加载如下图所示

安装成功如下图所示:

OVER!

来源:作只猫作只狗

物联沃分享整理
物联沃-IOTWORD物联网 » SyntaxError: future feature annotations is not defined

发表评论