python - How to fix 'invalid syntax error' in tensorwatch?
问题描述
After I installed the tensorwatch package, I imported it but here was an error. Some details are shown below, could anyone help me? Thanks a lot.
import tensorwatch
Traceback (most recent call last):
File "C:\Users\33574\Anaconda3\envs\tensorflow2\lib\site-packages\IPython\core\interactiveshell.py", line 2862, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-1-d0d9e150d101>", line 1, in <module>
import tensorwatch
File "C:\Users\33574\Anaconda3\envs\tensorflow2\lib\site-packages\tensorwatch\__init__.py", line 6, in <module>
from .watcher_client import WatcherClient
File "C:\Users\33574\Anaconda3\envs\tensorflow2\lib\site-packages\tensorwatch\watcher_client.py", line 5, in <module>
from .zmq_wrapper import ZmqWrapper
File "C:\Users\33574\Anaconda3\envs\tensorflow2\lib\site-packages\tensorwatch\zmq_wrapper.py", line 16
_thread:Thread = None
^
SyntaxError: invalid syntax
解决方案
确保您的 python 版本是 3.5。它可能在 Ubuntu 16.06 LTS 中工作,但我在 Windows 上遇到同样的问题
推荐阅读
- javascript - 无法使用日历读取未定义的属性“拆分”
- python - 是否可以遍历函数中的所有 if 语句?
- angular - node_modules/@types/three/three-core.d.ts(7800,18) 中的错误:错误 TS2304:找不到名称“VRDisplay”
- javascript - 如何在 javascript 中翻译 3D 对象
- django - 获取通过网络传输的 HTTP 请求(Django)
- mongodb - 如何在 MongoDB 中查询嵌套文档?
- dependency-injection - 如何在不访问类 impl 代码的情况下强制注入特定实例?
- firebase - 反应导航“导航”功能在firebase异步登录功能中不起作用
- c# - 使用代理与 HttpWebRequest if/else
- ios - 如何在swift中使用嵌套的json和结构