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

相关推荐
wanhengidc10 分钟前
网站服务器具体功能有哪些?
运维·服务器·网络·网络协议·智能手机
NineData17 分钟前
使用NineData实现MySQL异地多活场景
运维·数据库·mysql
爱学习的小囧33 分钟前
嵌套式 ESXi 8.x/9.0 虚拟设备下载与实战指南
java·linux·运维·服务器·虚拟化
hj28625133 分钟前
初学linux命令day2
linux·运维·服务器
硅基导游44 分钟前
linux系统与进程内存使用情况探测
java·linux·运维
大卡片1 小时前
linux库的制作
linux
Harvy_没救了1 小时前
【Linux】循环语句
linux·运维
小比特_蓝光1 小时前
Linux----进程概念
linux·运维·服务器
大卡片1 小时前
Linux进程基础
linux·运维·服务器
.柒宇.1 小时前
docker容器技术实战
运维·docker·容器