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

相关推荐
北漂Zachary16 分钟前
AI训练硬件选型:GPU算力梯队全解析
人工智能·gpu算力
mfxcyh32 分钟前
使用MobaXterm配置nginx
java·服务器·nginx
YSF2017_335 分钟前
C语言16-makefile(3)——makefile的模式规则
linux·c语言·开发语言
阿里巴巴首席技术官1 小时前
通过纯Nginx实现一个简单的文件上传功能
运维·nginx
pengyi8710151 小时前
动态IP池快速更换实操方案,5分钟完成IP替换
服务器·网络·tcp/ip
GL_Rain1 小时前
快速搭建Halo博客 + 崩溃秒恢复方案(Docker极简部署)
运维·docker·容器
不做无法实现的梦~2 小时前
Linux 上使用 CLion 开发嵌入式,并用 Codex CLI
linux·运维·服务器
张3232 小时前
Ansible拆分大型Playbook
linux·ansible
被摘下的星星2 小时前
以太网技术
服务器·网络
卓豪终端管理3 小时前
两种终端数据清除策略的技术笔记:企业定向清除 vs 完全擦除
运维·自动化