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

相关推荐
风静雪冷39 分钟前
grep命令要点、详解和示例
linux
我是哈哈hh1 小时前
【MySQL】在UBuntu环境安装以及免密码登录入门
linux·数据库·mysql·ubuntu
Lovyk1 小时前
基于 Ansible 与 Jinja2 模板的 LNMP 环境及 WordPress 自动化部署实践
linux·运维·服务器·自动化·ansible
LKAI.1 小时前
传统方式部署(RuoYi-Cloud)微服务
java·linux·前端·后端·微服务·node.js·ruoyi
知白守黑2672 小时前
Linux磁盘阵列
linux·运维·服务器
维尔切3 小时前
Linux中基于Centos7使用lamp架构搭建个人论坛(wordpress)
linux·运维·架构
tan77º4 小时前
【项目】分布式Json-RPC框架 - 项目介绍与前置知识准备
linux·网络·分布式·网络协议·tcp/ip·rpc·json
丘大梨4 小时前
QT 基础聊天应用项目文档
运维·数据库·系统架构
怀刃5 小时前
C# 内存监控怎么定位问题
运维
TPBoreas5 小时前
Jenkins启动端口修改失败查找日志
运维·服务器·jenkins