我一直在尝试为 Quantum Katas 运行 Q#,但在找到 Q# 内核方面遇到了一些困难。唯一显示的内核是用于 Jupyter Notebook 的 Python 3 内核。奇怪的是,当我执行 jupyter kernalspec list 时,内核会出现。我正在使用 VS Code。这是 jupyter 内核规范列表 https://i.stack.imgur.com/Ubk5J.png
总结一下上面评论中所说的内容:
- First, make sure iqsharp is installed. Run
dotnet iqsharp --version
to ensure that the tool exists.
- 如果没有,请运行
dotnet tool install -g Microsoft.Quantum.IQSharp
安装它。
- Then run
dotnet iqsharp install
to register the IQ# kernel in your Jupyter configuration.
- If your
jupyter
安装仍然无法识别内核,这可能是一个权限问题,具体取决于您安装和运行 Jupyter 的方式。尝试dotnet iqsharp install --user
反而。
至于 VS Code 的 Jupyter 实现,目前不支持 R、Julia、Q# 等非 Python 内核。此 GitHub 问题跟踪添加支持:https://github.com/microsoft/vscode-python/issues/8521 https://github.com/microsoft/vscode-python/issues/8521
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)