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

相关推荐
鸽芷咕15 分钟前
【Python报错已解决】ModuleNotFoundError: No module named ‘paddle‘
开发语言·python·机器学习·bug·paddle
腾飞的信仰2 天前
如何快速解决程序中的BUG
bug
Everglowwwwww2 天前
【bug】通过lora方式微调sdxl inpainting踩坑
学习·计算机视觉·ai作画·stable diffusion·bug
数据最前线2 天前
创建索引遇到这个Bug,19c中还没有修复
oracle·bug
CV金科2 天前
蓝桥杯-STM32G431RBT6(UART解析字符串sscanf和解决串口BUG)
c语言·stm32·单片机·嵌入式硬件·mcu·算法·bug
DisonTangor3 天前
网传阿里云盘出现bug,可看到其他用户云盘图片
阿里云·bug
后端小张3 天前
System.out源码解读——err 和 out 一起用导致的顺序异常Bug
java·开发语言·jdk·bug
我又来搬代码了3 天前
【Android】【Bug】Activity全屏(保留底部按钮)被打断变成非全屏了
android·bug
__water3 天前
『功能项目』调整Boss技能bug【51】
c#·bug·unity引擎
johnny2333 天前
《Effective Debugging:软件和系统调试的66个有效方法》读书笔记-Part2
bug