所以几天前我用pip install tensorflow==1.15
用pip安装了tensorflow,今天我想搜索我的models-master文件,我没有找到。我使用 pip uninstall tensorflow
卸载了 tensorflow,然后我从 github 安装了它并将它添加到我正在处理的项目的文件夹中,它与我原来的 .py 文件在同一个文件夹中项目。这是因为我需要在文件上使用 protoc,因为我之前收到过错误消息。我想我现在已经完成了 protoc 部分,但我无法测试它,因为每当我想运行我的主文件时,我都会收到以下错误消息:
Traceback (most recent call last):
File "C:\Users\user\Desktop\captcha solver\main_.py", line 1, in <module>
from CAPTCHA_object_detection import *
File "C:\Users\user\Desktop\captcha solver\CAPTCHA_object_detection.py", line 18, in <module>
from object_detection.utils import ops as utils_ops
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection\utils\ops.py", line 291, in <module>
dtype=tf.float32):
AttributeError: module 'tensorflow' has no attribute 'float32'
我认为这是因为我安装 tensorflow 的方式,但我不知道我做错了什么,虽然我从来没有安装过没有 pip 的模块。