【问题标题】:C++14 no visible after installing xeus-cling in Jupyter (Ubuntu 18.04 - Anaconda)在 Jupyter 中安装 xeus-cling 后 C++14 不可见(Ubuntu 18.04 - Anaconda)
【发布时间】:2020-05-16 03:03:30
【问题描述】:

我遵循了 xeus-cling 的安装(创建了一个环境,激活,在那里安装了 xeus-cling),当我想在 jupyter 笔记本中选择 C++14 内核时,它只出现 Python3。我做错了什么?

【问题讨论】:

  • 您遵循了哪些指示?您如何尝试“选择 C++14 内核”? Python3是如何“出现”的?另外请花一些时间阅读how to ask good questionsthis question checklist
  • 嗨,我按照github.com/jupyter-xeus/xeus-cling 安装指南。当我创建一个 jupyter 笔记本时,它没有出现 c++14 选项。只有 Python3。
  • 最简单的解决方法可能是在同一环境中安装 Jupyter Notebook。然后确保在启动 Jupyter 之前激活该环境。
  • 是的@darthbith,我使用的是默认的 Jupyter!感谢您的帮助。

标签: jupyter-notebook anaconda environment-variables jupyter xeus-cling


【解决方案1】:

我遇到了同样的问题。这是因为您的环境中没有安装 jupyter-notebook。正在启动的 jupyter 服务器是全局服务器,因此您看不到 c++14 选项。解决办法是:

  1. 创建一个新目录并 git clone 存储库。
  2. 在cmd中运行conda env create -f environmental.yml命令。
  3. 运行conda activate xeus-cling 命令。
  4. 运行jupyter notebook 命令。

您现在应该能够看到 c++14 和 c++17 选项。第 2 步创建了 xeus-cling 环境并安装了所有正确的包版本,包括正确的 jupyter notebook 版本。

【讨论】:

    【解决方案2】:

    在您的环境中安装笔记本。

    conda install xeus-cling notebook -c QuantStack -c conda-forge
    

    【讨论】:

    • conda install notebook 在 cling conda 环境中就够了。
    【解决方案3】:

    你需要register new kernels in jupyter:

    jupyter kernelspec install PREFIX/share/jupyter/xcpp11 --sys-prefix
    jupyter kernelspec install PREFIX/share/jupyter/xcpp14 --sys-prefix
    jupyter kernelspec install PREFIX/share/jupyter/xcpp17 --sys-prefix
    

    【讨论】:

      猜你喜欢
      • 2019-05-02
      • 1970-01-01
      • 2021-07-26
      • 1970-01-01
      • 2019-08-19
      • 1970-01-01
      • 2019-05-22
      • 1970-01-01
      • 2018-07-25
      相关资源
      最近更新 更多