SyntaxError: future feature annotations is not defined

FCN源码出现错误SyntaxError: future feature annotations is not defined,出现错误如下图所示:
SyntaxError: future feature annotations is not defined
然后我在网上找错误是因为python版本的问题,因此需要把python3.6.x换为python3.7.0

1.查看当前python版本
在终端Terminal输入:
$ conda list
回车,就会出现当前环境下的所有库;
SyntaxError: future feature annotations is not defined
往下翻可以看到当前环境下的python版本为3.6.15(这里不用卸载,只需安装新的版本就可以把旧的版本覆盖掉)
SyntaxError: future feature annotations is not defined
2.在当前环境下安装 python3.7.0
在终端Terminal输入
$ pip install python==3.7.0
回车,安装成功;若安装失败会出现下图错误;
SyntaxError: future feature annotations is not defined

在终端Terminal输入
$ conda install python==3.7.0
回车,加载如下图所示
SyntaxError: future feature annotations is not defined
安装成功如下图所示:
SyntaxError: future feature annotations is not defined
OVER!

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年3月10日
下一篇 2023年3月10日

相关推荐