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.

原因是tensorflownumpy 版本不兼容的问题

activate TF2.1

pip list

pip uninstall numpy

python -m pip install numpy==1.18.5

相关推荐
初圣魔门首席弟子2 天前
bug【已解决】腾讯 WorkBuddy 无法访问:校园网限制导致的网络问题排查全记录
bug
乐兮创想 小林4 天前
企业官网的运维分工模型:内容自助、Bug 终身免费修与服务器托管的边界设计
运维·服务器·bug·网站建设·企业官网·北京网站建设公司
菠萝猫yena4 天前
bug描述规范
bug
乐兮创想 小林4 天前
生物科技官网的工程化设计:产品×应用二维信息架构、多语言与国际化 SEO 实践
运维·服务器·bug·网站建设·企业官网·北京网站建设公司
调问开源问卷DWSurvey4 天前
调问更新5.16~5.30:解锁Excel图片上传,修复多项高频体验Bug
bug
胡图图不糊涂^_^4 天前
测试BUG篇
学习·bug·测试
搬石头的马农4 天前
从零配置Claude自动修Bug:6步打造全自动开发流程
java·人工智能·python·bug·ai编程
winlife_5 天前
让 AI 自动跑 PlayMode 回归测试:从 BUG 注入到自动判 FAIL 的完整闭环
人工智能·unity·bug·ai编程·mcp·回归测试·游戏测试
坚果的博客5 天前
Flutter OHOS SDK 版本目录校验 Bug 修复实战
flutter·bug
加强洁西卡5 天前
【Bug】解决vscode里ssh连接的虚拟机的codex的侧边栏打开只有logo没有登录或输入框的问题
bug