【发布时间】:2021-04-06 15:48:43
【问题描述】:
我正在关注https://automaticaddison.com/real-time-object-recognition-using-a-webcam-and-deep-learning/#top 上的实时对象检测,但遇到了障碍 (我用的是windows)
Traceback (most recent call last): File "object_detection_test.py",
line 15, in <module>
from utils import label_map_util File "C:\Users\1rock\Documents\TensorFlow\models\research\object_detection\utils\label_map_util.py",
line 27, in <module>
import tensorflow.compat.v1 as tf ModuleNotFoundError: No module named 'tensorflow.compat.v1'
我使用pip install --ignore-installed --upgrade tensorflow==1.9 就像上面的链接所说的那样,在运行时我得到了这些包及其版本和一个错误,希望它与问题相关
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
ipywidgets 7.6.0 requires jupyterlab-widgets>=1.0.0, which is not installed.
Successfully installed absl-py-0.11.0 astor-0.8.1 gast-0.4.0 grpcio-1.34.0 importlib-metadata-3.3.0 markdown-3.3.3 numpy-1.19.4 protobuf-3.14.0 setuptools-51.0.0.post20201207 six-1.15.0 tensorboard-1.9.0 tensorflow-1.9.0 termcolor-1.1.0 typing-extensions-3.7.4.3 werkzeug-1.0.1 wheel-0.36.2 zipp-3.4.0
【问题讨论】:
-
可以分享
print(tensorflow.__version__)的输出吗? -
嗨,每当我在控制台上输入
print(tensorflow.__version__)时,我都会收到Unable to initialize device PRN -
我查看了一个可能的修复程序,激活了 conda env,然后将目录更改为 tensorflow 文件夹,但仍然收到
Unable to initialize device PRN -
但根据我关注的网站是 tensorflow==1.9
-
用python做。启动python然后执行
print(tensorflow.__version__)
标签: python tensorflow object-detection