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

相关推荐
永康李21 小时前
Pandas:从一个DataFrame中直接索引赋值到另一个索引位置出错的Bug及其解决方案
python·bug·pandas
NPE~21 小时前
Bug:Goland debug失效详细解决步骤【合集】
go·bug·goland·dlv失效
Urf_read1 天前
改BUG:远程连接redis失败,可能是防火墙的问题
java·redis·python·bug
Tlog嵌入式3 天前
单片机常见bug记录(长期更新)
单片机·嵌入式硬件·bug
会发光的猪。4 天前
el-input无法输入0.0001的小数,自动转换为0在vue3中的bug
前端·javascript·vue.js·elementui·bug
shandianchengzi4 天前
【BUG】LLM|Ubuntu 用 ollama 部署 DeepSeek 但没输出,llama 有输出
ubuntu·llm·bug·llama·ollama·deepseek
抽象具象化5 天前
Bug日记:Linux中systemctl restart network失败问题,网络故障
linux·运维·bug
王天华帅哥5 天前
day3 改bug
bug
吉凶以情迁5 天前
lua的local 变量和self 变量的理解理解后解决自己写的bug.
开发语言·bug·lua
qq_527887875 天前
【已解决】TypeError: AsyncConnectionPool.__init__(), new install bug, httpx==0.24.1
bug·httpx