python - Theano 找不到 libcuda.so
问题描述
我已经使用 miniconda 安装了 theano:
conda install theano
这个安装
libgpuarray: 0.7.6-h14c3975_0
mkl-service: 1.1.2-py27hb2d42c5_4
pygpu: 0.7.6-py27h3010b51_0
theano: 1.0.2-py27h6bb024c_0
然后我运行我的程序并收到消息:
Could not initialize pygpu, support disable
[...]
File "pygpu/gpuarray.pyx", line 658, in pygpu.gpuarray.init
File "pygpu/gpuarray.pyx", line 587, in pygpu.gpuarray.pygpu_init
GpuArrayException: Could not load "libcuda.so": libcuda.so: cannot open shared object file: No such file or directory
所以它找不到libcuda。如果我这样做,我会收到类似的消息
python
import pygpu
pygpu.test()
我在 /opt/cuda 中有一个 cuda 安装。libcuda.so 在 /opt/cuda/lib64 下。
我尝试将 /opt/cuda/lib64 添加到我的 LD_LIBRARY_PATH 但没有成功。我还尝试了多个以前版本的 theano 和 pygpu。它还在我脸上笑。在没有成功的情况下来回走了几个小时。
解决方案
推荐阅读
- c# - Viewmodel 转换为 Json 失败
- ios - 具有交错开始时间的 CAKeyframeAnimation
- python - slackclient OSError: [Errno 24] 打开的文件太多
- laravel - 如何在 Laravel 的 Forge 中刷新 .ENV 文件?
- python - python计算客户端和服务器应用程序之间的带宽、错误包率和传输率
- .net - 找不到包“Microsoft.AspNet.WebApi.Client”.Net Core 2.1 的编译库位置
- java - spring data JPA CriteriaBuilder.isNull 返回语法错误
- haskell - 单个文件上的 ghcid
- java - 从 ObjectList 中获取值
- java - 在 Jax ws 肥皂服务中发送 400 错误响应代码