ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
这是在python中使用caffe产生的错误.
程序很普通:
#-*-coding=utf-8-*- import numpy as np
import matplotlib.pyplot as plt # Load caffe
import sys
caffe_root = "~/Documents/caffe-master/"
sys.path.insert(0, caffe_root + 'python')
import caffe import os caffe.set_device(0)
caffe.set_mode_gpu()
model_weights = "test1_iter_240000.caffemodel"
model_def = "test.prototxt" net = caffe.Net(model_def, model_weights, caffe.TEST)
image = caffe.io.load_image("1.jpg")
print(net.blobs['data'].data.shape) 参考网址:https://github.com/tensorflow/tensorflow/issues/5343
locate libcudart.so.8.0
/usr/local/cuda-8.0/lib64/libcudart.so.8.0
/usr/local/cuda-8.0/lib64/libcudart.so.8.0.61
我的机子上,LD_LIBRARY_PATH已经包含了/usr/local/cuda-8.0/lib64
解决方法:sudo ldconfig /usr/local/cuda/lib64
ldconfig命令的用途主要是在默认搜寻目录/lib和/usr/lib以及动态库配置文件/etc/ld.so.conf内所列的目录下,搜索出可共享的动态链接库(格式如lib*.so*),进而创建出动态装入程序(ld.so)所需的连接和缓存文件。缓存文件默认为/etc/ld.so.cache,此文件保存已排好序的动态链接库名字列表,为了让动态链接库为系统所共享,需运行动态链接库的管理命令ldconfig,此执行程序存放在/sbin目录下。
ldconfig通常在系统启动时运行,而当用户安装了一个新的动态链接库时,就需要手工运行这个命令。
ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory的更多相关文章
- 新转移注意(caffe):ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory
https://github.com/NVIDIA/DIGITS/issues/8 For this error ImportError: libcudart.so.7.0: cannot open ...
- 安装tensorflow报ImportError: libcublas.so.9.0: cannot open shared object file的解决方法【转】
本文转载自:https://blog.csdn.net/qq_37274615/article/details/81099738 转载自:https://blog.csdn.net/qysh123/a ...
- 导入tensorflow:ImportError: libcublas.so.9.0: cannot open shared object file: No such file or director【转】
本文转载自:https://blog.csdn.net/ksws0292756/article/details/80034086 版权声明:本文为博主原创文章,转载请一定附上博主原文链接,并署名转自Z ...
- pycharm报错:ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory
pycharm报错:ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory ...
- ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory
问题描述: ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory 首先检 ...
- tf-gpu报错:ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
错误1:ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory 一般这种问题 ...
- ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
这是因为我装了tensorflow-gpu 1.5版本,而我用的是cuda 8.0和cudnn6.0,1.5版本要求cuda 9.0,我的做法就是回滚tensorflow版本.
- ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory 【学习笔记】【原创】
作者:庄泽彬(欢迎转载,请注明作者) 说明:千辛万苦终于在ubuntu18.04上安装好cuda9.1与cudnn7.0.5,但是导入import tensorflow as tf却报了这个错误. 上 ...
- python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...
随机推荐
- 2018.7.20 编程题: 写一个Singleton出来。
编程题: 写一个Singleton出来. Singleton模式主要作用是保证在Java应用程序中,一个类Class只有一个实例存在. 一般Singleton模式通常有几种种形式: 第一种形式: 定义 ...
- matlab中padarray函数在numpy、python中的实现
a = np.arange(6) a = a.reshape((2, 3)) print np.lib.pad(a, 1, 'symmetric') 运行结果: [[ ] [ ] [ ] [ ]]
- HttpWebRequest类之基本定义
HttpWebRequest和HttpWebResponse类是用于发送和接收HTTP数据的最好选择.它们支持一系列有用的属性.这两个类位 于System.Net命名空间,默认情况下这个类对于控制台程 ...
- 【杂题总汇】UVa-1336 Fixing the Great Wall
[UVA-1336]Fixing the Great Wall 一开始把题看错了……直接用的整数存储答案:之后用double存最后输出答案的时候取整就AC了
- 懒下载软件,一行代码连接wifi^_^
按键盘的windows+R,输入cmd,回车键 设置语句netsh wlan set hostednetwork mode=allow ssid=user key=possword 按回车键 启动语句 ...
- Centos7 使用LVM进行新加磁盘管理
centos7使用LVM管理一块新的磁盘 注意!文中凡是带#的都是命令标志. 一些重要概念: LV(Logical Volume)- 逻辑卷, VG(Volumne Group)- 卷组, P ...
- Ansible学习 Playbooks_1
Playbooks是Ansible中执行较复杂任务的一种的方式,Playbook由1个或多个play组成,语法格式是YAML,下面以一个简单的任务为例,开始我们的Playbook学习: 任务描述: 1 ...
- BeanFactory和IOC控制反转
之前在看spring,看IOC实在是云里雾里,包括看AOP也是云里雾里的,后来重新学习Java Web,做了一个简单的web项目,再之后看了崔希凡老师的视频,Day27和Day28两天的内容,真的很有 ...
- manjaro安装teamviewer后无法打开
点桌面快捷方式一闪而过 命令行运行提示 $ teamviewer /opt/teamviewer/tv_bin/script/tvw_exec:行7: /opt/teamviewer/logfiles ...
- [USACO1.5] 回文质数
P1217 Prime Palindromes 题目描述 因为151既是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数. 写一个程序来找出范围[a,b](5 < ...