我最近重新安装了我的Anaconda,然后创建了一个新的Conda环境,名为myenv。然后我在其中安装了必要的软件包,如Jupyter,Numpy,Pandas,Tensorflow 2,Keras等。
现在,当我打开Jupyter notebook时,它还在工作。当我点击一个新的Notebook> Python3:(myenv)时,它给了我一个非常大的错误,内核快要死了。
我相信这个错误与我的NVIDIA驱动程序有关,但它以前工作得很好。
此外,它在检测GPU时,
import tensorflow as tf
tf.test.is_gpu_available()然后,在长输出之后,它会给出
GPU:0 with 1380 MB memory) -> physical GPU (device: 0, name: GeForce MX110, pci bus id: 0000:01:00.0, compute capability: 5.0)
2020-07-20 22:32:54.350989: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x20284f8ac10 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-07-20 22:32:54.355860: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce MX110, Compute Capability 5.0
Out[2]: True这意味着GPU工作正常。
我在Jupyter Notebook中得到的错误是
[W 22:33:54.958 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20200720222753 (::1) 10.00ms referer=http://localhost:8888/notebooks/Desktop/Untitled1.ipynb
[E 22:33:56.401 NotebookApp] Failed to run command:
['C:\\Anaconda\\envs\\myenv\\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\Ahmad Mustafa Anis\\AppData\\Roaming\\jupyter\\runtime\\kernel-d6e4e2e3-6570-48ac-808e-8a456b430033.json']
PATH='C:\\Anaconda\\envs\\myenv;C:\\Anaconda\\envs\\myenv\\Library\\mingw-w64\\bin;C:\\Anaconda\\envs\\myenv\\Library\\usr\\bin;C:\\Anaconda\\envs\\myenv\\Library\\bin;C:\\Anaconda\\envs\\myenv\\Scripts;C:\\Anaconda\\envs\\myenv\\bin;C:\\Anaconda\\condabin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\libnvvp;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32\\OpenSSH;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\NVIDIA Corporation\\Nsight Compute 2019.1;C:\\Program Files\\Git\\cmd;C:\\Anaconda;C:\\Anaconda\\Library\\mingw-w64\\bin;C:\\Anaconda\\Library\\usr\\bin;C:\\Anaconda\\Library\\bin;C:\\Anaconda\\Scripts;C:\\Users\\Ahmad Mustafa Anis\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Ahmad Mustafa Anis\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\libnvvp;C:\\Users\\Ahmad Mustafa Anis\\Downloads\\cmder;.;C:\\Program Files\\JetBrains\\PyCharm Professional Edition with Anaconda plugin 2020.1.2\\bin;.'
with kwargs:
{'stdin': -1, 'stdout': None, 'stderr': None, 'cwd': 'C:\\Users\\Ahmad Mustafa Anis\\Desktop', 'close_fds': False}
[E 22:34:20.721 NotebookApp] Uncaught exception POST /api/sessions (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/api/sessions', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\web.py", line 1703, in _execute
result = await result
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\jupyter_client\multikernelmanager.py", line 186, in start_kernel
km.start_kernel(**kwargs)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\jupyter_client\manager.py", line 308, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, **kw)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\jupyter_client\manager.py", line 215, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\site-packages\jupyter_client\launcher.py", line 135, in launch_kernel
proc = Popen(cmd, **kwargs)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "c:\users\ahmad mustafa anis\.conda\envs\myenv\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
[W 22:34:20.727 NotebookApp] Unhandled error
[E 22:34:20.728 NotebookApp] {
"Host": "localhost:8888",
"Connection": "keep-alive",
"Content-Length": "149",
"Accept": "application/json, text/javascript, */*; q=0.01",
"X-Requested-With": "XMLHttpRequest",
"X-Xsrftoken": "2|75d26d1d|23d90b6fbf2e9d8bd4e7f57882dbc1c6|1593362714",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
"Content-Type": "application/json",
"Origin": "http://localhost:8888",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Dest": "empty",
"Referer": "http://localhost:8888/notebooks/Desktop/Untitled2.ipynb?kernel_name=python37764bitmyenvconda4a11ba26287d4d1c969b9946e31eb2a2",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9,ur;q=0.8",
"Cookie": "_xsrf=2|75d26d1d|23d90b6fbf2e9d8bd4e7f57882dbc1c6|1593362714; username-localhost-8888=\"2|1:0|10:1595266075|23:username-localhost-8888|44:MjhjNzFlOWEyM2M4NDFjMzlkYWY4Mzc5YzRkMGFjNDc=|cd2a2851f9a9f34c991b1b89b72f8378035cc40aa421b0489e390366ed50e85b\""
}
[E 22:34:20.728 NotebookApp] 500 POST /api/sessions (::1) 24336.38ms referer=http://localhost:8888/notebooks/Desktop/Untitled2.ipynb?kernel_name=python37764bitmyenvconda4a11ba26287d4d1c969b9946e31eb2a2
[W 22:34:20.737 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20200720222753 (::1) 6.00ms referer=http://localhost:8888/notebooks/Desktop/Untitled2.ipynb?kernel_name=python37764bitmyenvconda4a11ba26287d4d1c969b9946e31eb2a2
[I 22:34:22.257 NotebookApp] Interrupted...
[I 22:34:22.258 NotebookApp] Shutting down 1 kernel
[I 22:34:22.558 NotebookApp] Kernel shutdown: 40dadb8b-1219-4bf9-a735-242f99f0b5b4它提到了path,所以这是我的环境路径图。

我很遗憾现在删除了旧的工作蟒蛇。请帮我解决这个问题。谢谢
发布于 2020-07-21 11:14:08
运行Ubuntu,也有向上的快乐时刻,因为我重新安装了一切,无法使用我的双GPU的tensorflow。
我尝试了10,000种方式来安装Ubuntu,Anaconda等。
工作原理--安装ubuntu。安装anaconda。
conda install tensorflow-gpu
如果我这样做,conda安装就能正确地完成所有nvidia的工作-正确的cudnn、工具包、驱动程序等。我一直在使用pip install,在tensorflow安装之前,我一直在尝试获取驱动程序和所有nvidia的工作。Pip安装没有安装正确匹配的nvidia内容。
https://stackoverflow.com/questions/63000967
复制相似问题