TensorFlow运行bug汇总

1、ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+

解决方案

pip install urllib3==1.26.15 -i https://pypi.tuna.tsinghua.edu.cn/simple

升级或者降级

复制代码
(TF2.1) C:\Users\Administrator>pip install urllib3==1.26.15  -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting urllib3==1.26.15
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7b/f5/890a0baca17a61c1f92f72b81d3c31523c99bec609e60c292ea55b387ae8/urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
     ---------------------------------------- 140.9/140.9 kB 2.1 MB/s eta 0:00:00
Installing collected packages: urllib3
  Attempting uninstall: urllib3
    Found existing installation: urllib3 2.0.7
    Uninstalling urllib3-2.0.7:
      Successfully uninstalled urllib3-2.0.7
Successfully installed urllib3-1.26.15

2、If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.

升级或者降级

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn protobuf=3.20.1

复制代码
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting protobuf==3.20.1
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/36/16/cfba8fcd817df923827233115df35dc048af12d0afa13df79b303865855a/protobuf-3.20.1-cp37-cp37m-win_amd64.whl (905 kB)
     ---------------------------------------- 905.1/905.1 kB 3.2 MB/s eta 0:00:00
Installing collected packages: protobuf
  Attempting uninstall: protobuf
    Found existing installation: protobuf 4.24.4
    Uninstalling protobuf-4.24.4:
      Successfully uninstalled protobuf-4.24.4
Successfully installed protobuf-3.20.1

3、cannot detect archive format

ERROR: Cannot determine archive format of C:\Users\XXX

复制代码
pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple

改成

复制代码
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn xxx

4、permission deny

权限错误:errno 13权限被拒绝

错误原因:

文件无法打开,可能产生的原因是文件找不到,或者被占用,或者无权限访问,或者打开的不是文件,而是一个目录。

把打开的文件关闭。。。。

5、Cannot convert a symbolic Tensor (lstm/strided_slice:0) to a numpy array.

原因是tensorflow 和numpy 版本不兼容的问题

activate TF2.1

pip list

pip uninstall numpy

python -m pip install numpy==1.18.5

相关推荐
JAVA面经实录9178 小时前
Java 后端专属提示词模板
java·重构·bug·ai编程
软件工程师文艺1 天前
上线前的综合测试报告:一份测试范围清单和 9 个 BUG 的复盘
bug
Kainy3 天前
Agent派单系统架构拆解:不用消息队列的长轮询设计如何实现手机远程派活修bug
系统架构·bug
康同学游戏坊10 天前
独立游戏周报|装备和技能模块推进,一边测试一边修Bug
游戏·bug
zhoulcc10 天前
前端响应处理:AjaxResult与TableDataInfo的JSON结构区别及统一取值方案
前端·后端·bug·ajaxresult·tabledatainfo
一切皆有可能!!14 天前
【SoduWork测评】本机跑源码,找到并修了7个Bug
windows·开源·bug·ai编程·soduwork
2601_9679873717 天前
程序员遇到BUG的解释
程序员·bug·软件开发·调试·幽默
jianqiang.xue17 天前
线程一切换浮点全作废:五天修好的隐秘bug
bug
寂寞的船20 天前
【Unity Bug挑战】第12期 Awaitable 二次 await 死锁之谜 —— 为什么同一个异步操作等两次就卡死?
unity·c#·游戏引擎·bug
海拥✘22 天前
让 AI 修 AI 平台自己的 Bug:我用 SoduWork 给 SoduWork 提了一个 PR
人工智能·bug