python-3.x - from __future__ import absolute_import as _absolute_import 错误,tensorflow 不起作用
问题描述
我正在使用 spyder 中的 tensorflow 进行深度学习,但我是新手。突然 tensorflow 停止工作,现在import tensorflow as tf
行给出以下错误:
from __future__ import absolute_import as _absolute_import
^
SyntaxError: invalid syntax
我的其他工作项目也不再有效。我搜索了错误,但找不到有用的解决方案。
解决方案
这是导入模块的正确语法,from __future__ import absolute_import
但由于您没有输入错误的完整细节,这可能是 python 版本的问题,因为TensorFlow
目前支持直到Python3.8
. 细节
推荐阅读
- python - 删除列仅包含 NaN 或零的行
- google-cloud-platform - gke 节点的承诺使用折扣
- django - Nuxt Auth 'loginWith' 功能不向 DRF 发送数据
- python-3.x - PermissionError: [Errno 13] Permission denied: './model' PYTHON
- javascript - Dropdown with Search Box using Bootstrap Selectpicker not working
- python-3.x - 无法打开 jupyterlab
- r - 如何从~3-4 GB的txt文件有效地将大矩阵(20k x 20k)加载到Rstudio中?[子图提取]
- windows - WSL2:使用 *.code-workspace 文件从命令行启动 VSCode
- python - 如何将每日数据批量转换为每周数据
- java - java.lang.String 不能转换为 CustomObj