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

相关推荐
云动雨颤3 分钟前
Python 自动化办公神器|一键转换所有文档为 PDF
运维·python
Fanmeang12 分钟前
OSPF高级特性之FRR
运维·网络·华为·ip·ospf·spf·frr
小张不嚣张꒰ঌ(˚ᆺ˚)໒꒱12 分钟前
Centos7在yum当中遇到Could not resolve host: mirrorlist.centos.org解决方案
linux·运维·服务器·centos
Sally璐璐14 分钟前
CentOS企业级文件服务器终极部署指南
linux·服务器·centos
岁月玲珑15 分钟前
【如何判断Linux系统是Ubuntu还是CentOS】
linux·ubuntu·centos
梅孔立15 分钟前
yum update 报错 Cannot find a valid baseurl for repo: centos-sclo-rh/x86_64 等解决办法
linux·python·centos
ldj202016 分钟前
Centos 安装Jenkins
java·linux
Sca_杰19 分钟前
centos指令
linux·运维·centos
几道之旅20 分钟前
centos 7 安装NVIDIA Container Toolkit
linux·运维·centos
DuelCode21 分钟前
Windows VMWare Centos Docker部署Nginx并配置对Springboot应用的访问代理
linux·运维·服务器