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!

Original: https://blog.csdn.net/m0_48664152/article/details/124660861
Author: 作只猫作只狗
Title: SyntaxError: future feature annotations is not defined

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/671486/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球