跑代码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

相关推荐
Full Stack Developme2 小时前
JVM 与 Linux 交互的核心原理
linux·运维·jvm
Java识堂2 小时前
多级负载均衡架构
运维·架构·负载均衡
MXsoft6182 小时前
## 自动化巡检:从手工两小时到系统五分钟的落地实践
运维·自动化
ZLG_zhiyuan2 小时前
直击华南工博会|ZLG致远电子:EtherCAT与自动化总线应用方案动态实景呈现
运维·自动化
HackTwoHub2 小时前
最新Nessus2026.6.8版本主机漏洞扫描/探测工具Windows/Linux
linux·运维·服务器·安全·web安全·网络安全·安全架构
qq_163135752 小时前
Linux 【04-mkdir命令超详细教程】
linux
qq_163135752 小时前
Linux 【08-mv命令超详细教程】
linux
QWEDDRFTG2 小时前
C13/C19怎么选?服务器电源线电流与接口选型技巧
服务器
Nayxxu3 小时前
Gemini + RAG 企业知识库教程:从文档切片到答案生成
运维·人工智能
三雷科技4 小时前
Claude Code 命令行完全指南:从高效交互到自动化工作流
运维·自动化·交互