![](/img/trans.png)
[英]While Import python. ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
[英]tensorflow GPU on AWS elastic beanstalk - tf import error with calling “python” + “sudo” ( libcublas.so.9.0 error)
我正在
“ ImportError:libcublas.so.9.0:无法打开共享库文件:没有这样的文件或目录”
当我使用“ sudo python3.6 ...”调用我的应用程序时出现错误,但是当我仅调用“ python3.6 ...”时则没有错误
elastic beanstalk使用“ sudo”,因此不能删除该命令。
仅安装了CUDA 9.0(这是我们环境的正确版本),并且存在/usr/local/cuda/lib64/libcublas.so.9.0。
我们使用相同的配置和相同的AMI ID创建了一个单独的ec2实例:CUDA9ClassicAmazonLinuxDLAMIwithMXNetTensorflowandCaffe2,并且没有任何问题。 这似乎只是弹性豆茎存在的问题。
$ LD_LIBRARY_PATH ='/ usr / local / cuda / lib64:/ usr / local / lib:/ usr / lib:/ usr / local / cuda / extras / CUPTI / lib64:/ usr / local / mpi / lib:/ lib / :/家庭/ Ubuntu的/ src目录/ caffe2 /编译:/家庭/ EC2用户/ src目录/ caffe2 /编译:在/ usr /本地/ CUDA / lib64的:在/ usr / local / lib目录:/ usr / lib中:在/ usr /本地/ CUDA /演员/ CUPTI / lib64的:在/ usr /本地/ MPI / lib目录下:在/ usr /本地/ CUDA / lib64的:在/ usr / local / lib目录:/ usr / lib中:在/ usr /本地/ CUDA /演员/ CUPTI / lib64的:在/ usr /本地/ MPI / lib目录:/ lib中/:/首页/ Ubuntu的/ src目录/ caffe2 /编译:/家庭/ EC2用户/ src目录/ caffe2 /编译:在/ usr /本地/ CUDA / lib64的:在/ usr / local / lib目录:/ usr / lib中:在/ usr /本地/ CUDA /演员/ CUPTI / lib64的:在/ usr /本地/ MPI / lib目录下:”
$ PATH ='/ usr / local / cuda / bin:/ usr / local / bin:/ opt / aws / bin:/ usr / local / mpi / bin:/ home / ubuntu / src / caffe2 / build:/ home / EC2用户/ src目录/ caffe2 /编译:在/ usr /本地/ CUDA /斌:在/ usr / local / bin目录中:/ opt / AWS /斌:在/ usr /本地/ MPI /斌:在/ usr /本地/ CUDA /箱:在/ usr / local / bin目录中:/ opt / AWS /斌:在/ usr /本地/ MPI /斌:/首页/ Ubuntu的/ src目录/ caffe2 /编译:/家庭/ EC2用户/ src目录/ caffe2 /编译:在/ usr /本地/ CUDA /斌:在/ usr / local / bin目录中:/ opt / AWS /斌:在/ usr /本地/ MPI /斌:在/ usr / local / bin目录:/ bin中:在/ usr / bin中:在/ usr /本地/ sbin目录:/ usr / sbin目录:/ sbin目录中:/ opt / AWS /斌:/home/ec2-user/.local/bin:/家庭/ EC2用户/斌
有什么想法吗?
添加文件以设置新库的路径(在您的情况下为CUDA)
/etc/ld.so.conf.d/foo.conf
该文件的内容是CUDA库(/ usr / local / cuda / lib64)的路径
并致电
sudo ldconfig
确保该库包含在环境中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.