azure - Jupyter 笔记本内核上的 CNTK 无法工作

标签 azure ipython jupyter cntk azure-dsvm

我正在尝试让 Jupyter Notebook 与我的 Azure 数据科学 VM 配合使用,但内核无法正常工作。我使用 shellbash 安装 CNTK,并且它可以通过类似的命令运行良好。但是,当我使用 Anaconda 或使用命令“jupyter Notebook”将其拉出时,我收到此错误:

Traceback (most recent call last):
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-               packages\notebook\base\handlers.py", line 503, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-   packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in   create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in   start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 285, in wrapper
yielded = next(result)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\manager.py", line 243, in start_kernel
**kw)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

关于如何让 python 内核在笔记本中与 CNTK 一起工作有什么建议吗?

最佳答案

我打开 CNTK-py35 目录的终端并输入以下代码,内核开始工作并使其正常工作:

conda create -n py35 python=3.5
activate py35
conda install notebook ipykernel
ipython kernel install --user --name=python3.5

然后我从 Anaconda 内部打开 jupyter 笔记本并运行

import CNTK

关于azure - Jupyter 笔记本内核上的 CNTK 无法工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42428928/

相关文章:

AZURE Active Directory - 服务主体和企业应用程序之间有什么区别?

azure - 使用自定义域和 SSL 配置 2 个 Web 应用程序上的 Azure 流量管理器

azure - Azure 云服务中的目标 .NET 4.5.2

c# - dotnet core 3.1 Web api 与 Microsoft.Identity.Web 一起验证用户和应用程序 token

python - 使用 KernelClient API 在 ipython 内核中执行代码

ipython - 在spyder中无法获取ipython控制台

python - 使用 %prun 对执行时间短的函数进行分析

python - 如何将 .py 文件解释为 jupyter 笔记本

python - Ipython、jupyter 和内核之间有什么关系?

r - 绘图标签在 Linux 服务器上的 R Jupyter Notebook 中显示为十六进制 ASCII 代码