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

相关推荐
桌面运维家13 分钟前
Windows/Linux双启动:BIOS/UEFI多配置桌面创建指南
linux·运维·windows
xlp666hub19 分钟前
【Linux驱动实战】:字符设备驱动之内核态与用户态数据交互
linux·面试
無法複制20 分钟前
debian安装Postgresql-14.x
运维·postgresql·debian
阿达_优阅达21 分钟前
告别手工对账:xSuite 如何帮助 SAP 企业实现财务全流程自动化?
服务器·数据库·人工智能·自动化·sap·企业数字化转型·xsuite
久绊A25 分钟前
服务器新硬盘初始化与挂载
linux·挂载
IMPYLH37 分钟前
Linux 的 chroot 命令
linux·运维·服务器
一殊酒44 分钟前
【Docker】Docker Desktop 安装指南及汉化教程
运维·docker·容器
克莱因3581 小时前
Linux Cent OS7 at定时任务
linux·运维·服务器
RisunJan1 小时前
Linux命令-make(GNU的工程化编译工具)
linux·运维·gnu
闲猫1 小时前
Linux 历史命令(history)
linux·运维·chrome