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

相关推荐
小张同学a.几秒前
ELK企业级日志分析平台3——ES数据备份 & 集群监控 & ELFK+Kafka 架构部署
linux·运维·elk·elasticsearch·架构·kafka·filebeat
JenKinJia5 分钟前
Pycharm中增加远程服务器解释器无法连接的问题
服务器·pycharm·github
神龙斗士2407 分钟前
Socket编程:客户端与服务器通信全解析(网络编程)
运维·服务器·网络·socket
小则又沐风a10 分钟前
负载均衡式在线OJ---------第二幕
linux·c++·后端
中才实用17 分钟前
Jenkins自动化部署
运维·自动化·jenkins
snow@li19 分钟前
Kibana:功能全景梳理/Elastic Stack可视化管理平台
运维
AC赳赳老秦22 分钟前
官方技术文档聚合实践:用 OpenClaw 批量抓取开源项目文档,构建离线可检索技术知识库
java·运维·服务器·python·信息可视化·deepseek·openclaw
fengkai454528 分钟前
Linux服务--5.Nginx 服务
linux·运维·服务器
牛肉胡辣汤31 分钟前
开源模型落地实战|开发、运维、安全各岗位 AI 应用经验分享
运维·安全·开源
布局呆星9 小时前
云服务器上部署单项目/多项目
运维·服务器