跑代码KGAT遇到的错误的解决过程记录

1.pip install -U protobuf

conda install scikit-learn

2. jupyterLab生成一个新的kernel:

conda create -n kgat5 python=3.7.2 ipykernel

python -m ipykernel install --name kgat5 --display-name kgat5 --user

3.pip install tensorflow-gpu=1.12.0

安装后import tensorflow as tf报错,按照如下修改后,还是报错

(196条消息) ImportError: libcublas.so.9.0: cannot open shared object file: No such file...问题原因及解决方法_lzw李正文的博客-CSDN博客

于是,提升了tf的版本号,还是1.x:

pip install tensorflow-gpu=1.15.0

pip install tensorflow_gpu-1.15.0-cp37-cp37m-manylinux2010_x86_64.whl

4.报错:

TypeError: Descriptors cannot not be created directly.

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.

If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.

  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

解决方案:

pip install protobuf==3.20.*

5.CPU训练:

gpu-id=-1

6.报错:

2023-08-01 10:22:25.625741: F tensorflow/stream_executor/lib/statusor.cc:34] Attempting to fetch value instead of handling error Internal: no supported devices found for platform CUDA

Aborted (core dumped)

解决方案:

查看gpu使用情况: nvidia-smi

修改默认gpu-id=1

相关推荐
shjita3 小时前
centos中安装docker
linux·docker·centos
红红谈说3 小时前
浏览器自动化环境老是起不来?依赖治理与启动自检的一次复盘
运维·自动化·浏览器自动化·进程残留·环境依赖·启动自检·版本比较
程序猿老A3 小时前
阿里云linux服务器安装mysql并实现远程访问
linux·服务器·阿里云
wuminyu3 小时前
JVM虚拟线程的底层实现原理分析
java·linux·c语言·jvm·c++
M78佐菲3 小时前
ARM学习笔记(9)
linux·arm开发·笔记·嵌入式硬件·学习
赵民勇3 小时前
glib-compile-schemas命令详解
linux·运维
小小、码农4 小时前
〖Linux文件系统〗:彻底打通文件 IO 全链路
linux·开发语言·数据结构·c++·系统
大侠归来4 小时前
cJSON 源码解析:parse_string 函数深入剖析
linux·网络·算法
小小、码农4 小时前
〖Linux进程间通信〗IPC全家桶:匿名管道、FIFO、共享内存、消息队列与信号量一篇打通
linux·运维·服务器
阳光九叶草LXGZXJ4 小时前
达梦数据库-学习-67-SSL加密认证
linux·运维·数据库·sql·学习·ssl