PyDev 告诉 "error == cudaSuccess (35 vs. 0)CUDA driver version is insufficient for CUDA runtime version",但命令行工作正常

PyDev tells "error == cudaSuccess (35 vs. 0)CUDA driver version is insufficient for CUDA runtime version",but command line works fine

我的配置是这样的:

Ubuntu        16.04
Java          1.8
Python        2.7.12
Caffe         1.0
Cuda          8.0
Nvidia driver 375-66
PyDev         5.7.0.201704111357

And I tried to run this in bash:

https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation/tree/master/testing/python

来自

python -m Demo

它工作正常,但是当尝试从 eclipse-pydev 运行 时,得到这个错误:

WARNING: Logging before InitGoogleLogging() is written to STDERR
E0606 09:34:43.905447 15924 common.cpp:114] Cannot create Cublas handle. Cublas won't be available.
0
E0606 09:34:43.905640 15924 common.cpp:121] Cannot create Curand generator. Curand won't be available.
F0606 09:34:43.905845 15924 common.cpp:152] Check failed: error == cudaSuccess (35 vs. 0)  CUDA driver version is insufficient for CUDA runtime version
*** Check failure stack trace: ***

我认为这个问题是因为我使用 nvidia 驱动程序启动 OS 然后切换到 intel,如下所示:

这就是我想要的,因为希望使用嵌入式英特尔 VC 来处理 OS 相关工作,而将 Nvidia VC 留给 caffe(一种深度学习框架) jobs.The 问题是:

为什么,对于相同的 python 包装的 caffe 作业,命令行工作正常但 PyDev 给出这些错误?

通常这意味着您的命令行中有一些环境变量未在 PyDev 中复制。

通常的解决方法是从命令行启动 Eclipse,以便它继承在那里设置的变量。

感谢@Fabio Zadrozny 的提示

Window->Preferences->PyDev->Interpreters->Python Interpreter->点击Environment->New

create a env variable:
Name:LD_LIBRARY_PATH   Value:as in you system env