gpt4 book ai didi

python - ImportError : libcublas. so.8.0:无法打开共享对象文件:没有这样的文件或目录

转载 作者:行者123 更新时间:2023-12-03 02:31:50 24 4
gpt4 key购买 nike

我在代码中运行这个程序遇到了很大的麻烦。我已经尝试过重新安装 packges、在环境中安装等,但我认为我做得不正确。

import keras 
from keras.models import Sequential
from keras.layers import Dense"

我收到此消息:

Using TensorFlow backend.

Traceback (most recent call last):

File "", line 1, in import keras

File "/home/wagner/anaconda3/lib/python3.5/site-packages/keras/init.py", line 3, in from . import utils

File "/home/wagner/anaconda3/lib/python3.5/site-packages/keras/utils/init.py", line 6, in from . import conv_utils

File "/home/wagner/anaconda3/lib/python3.5/site-packages/keras/utils/conv_utils.py", line 3, in from .. import backend as K

File "/home/wagner/anaconda3/lib/python3.5/site-packages/keras/backend/init.py", line 83, in from .tensorflow_backend import *

File "/home/wagner/anaconda3/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py", line 1, in import tensorflow as tf

File "/home/wagner/.local/lib/python3.5/site-packages/tensorflow/init.py", line 24, in from tensorflow.python import *

File "/home/wagner/.local/lib/python3.5/site-packages/tensorflow/python/init.py", line 49, in from tensorflow.python import pywrap_tensorflow

File "/home/wagner/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in raise ImportError(msg)

ImportError: Traceback (most recent call last): File "/home/wagner/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/home/wagner/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/home/wagner/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "/home/wagner/anaconda3/lib/python3.5/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/home/wagner/anaconda3/lib/python3.5/imp.py", line 343, in load_dynamic return _load(spec) ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory

无法加载 native TensorFlow 运行时。

参见https://www.tensorflow.org/install/install_sources#common_installation_problems

一些常见原因和解决方案。包括整个堆栈跟踪寻求帮助时出现此错误消息上方。

最佳答案

您正在运行什么版本的 TensorFlow、cuda 和 cudnn?

在工作目录中运行以下命令解决了我的问题:

导出 LD_LIBRARY_PATH=/usr/local/cuda-8.0/extras/CUPTI/lib64:$LD_LIBRARY_PATH

但是您必须将 /usr/local/cuda-8.0/extras/CUPTI/lib64 替换为计算机上的相关位置。

关于python - ImportError : libcublas. so.8.0:无法打开共享对象文件:没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47200662/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com