Python 安装两个不同版本的CUDA后如何切换CUDA版本?

Python 安装两个不同版本的CUDA后如何切换CUDA版本?,python,tensorflow,cuda,Python,Tensorflow,Cuda,我已经有了CUDA V9.0,但是现在我用cudnn 7.3安装了CUDA V10.0。我已经将tensorflow gpu版本升级到1.13.1。但是当我导入tensorflow时,我得到了以下错误。当我在cmd中搜索CUDA版本时,版本仍然是V9.0。当我检查环境变量CUDA V9.0和10.0时,我需要如何修改将CUDA Vversion切换到10.0 CUDA版本:- C:\Users\Gokul Adethya>nvcc --version nvcc : NVIDIA (R) C

我已经有了CUDA V9.0,但是现在我用cudnn 7.3安装了CUDA V10.0。我已经将tensorflow gpu版本升级到1.13.1。但是当我导入tensorflow时,我得到了以下错误。当我在cmd中搜索CUDA版本时,版本仍然是V9.0。当我检查环境变量CUDA V9.0和10.0时,我需要如何修改将CUDA Vversion切换到10.0

CUDA版本:-

C:\Users\Gokul Adethya>nvcc --version nvcc
: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017
Cuda compilation tools, release 9.0, V9.0.176

Error:-

Traceback (most recent call last):
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\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 "C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\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 "C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
C:\Users\Gokul Adethya>nvcc——版本nvcc
:NVIDIA(R)Cuda编译器驱动程序
版权所有(c)2005-2017英伟达公司
建于2017年9月1日星期五21:08:32中央夏令时
Cuda编译工具,9.0版,V9.0.176
错误:-
回溯(最近一次呼叫最后一次):
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\pywrap\u tensorflow.py”,第58行,在
从tensorflow.python.pywrap\u tensorflow\u内部导入*
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第28行,在
_pywrap\u tensorflow\u internal=swig\u import\u helper()
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第24行,在swig\u import\u helper中
_mod=imp.load_模块(“pywrap_tensorflow_internal”,fp,路径名,描述)
文件“C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py”,第242行,在加载模块中
返回加载动态(名称、文件名、文件)
文件“C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py”,第342行,在load\u dynamic中
返回负载(规格)
ImportError:DLL加载失败:找不到指定的模块。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\\uuuuuu init\uuuuuuuuuu.py”,第24行,在
从tensorflow.python导入pywrapu tensorflow 35; pylint:disable=未使用的导入
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\\uuuu init\uuuu.py”,第49行,在
从tensorflow.python导入pywrap\u tensorflow
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\pywrap\u tensorflow.py”,第74行,在
提高效率(msg)
ImportError:回溯(最近一次呼叫上次):
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\pywrap\u tensorflow.py”,第58行,在
从tensorflow.python.pywrap\u tensorflow\u内部导入*
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第28行,在
_pywrap\u tensorflow\u internal=swig\u import\u helper()
文件“C:\Users\Gokul Adethya\AppData\Roaming\Python\Python35\site packages\tensorflow\Python\pywrap\u tensorflow\u internal.py”,第24行,在swig\u import\u helper中
_mod=imp.load_模块(“pywrap_tensorflow_internal”,fp,路径名,描述)
文件“C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py”,第242行,在加载模块中
返回加载动态(名称、文件名、文件)
文件“C:\Users\Gokul Adethya\AppData\Local\Programs\Python\Python35\lib\imp.py”,第342行,在load\u dynamic中
返回负载(规格)
ImportError:DLL加载失败:找不到指定的模块。