【问题标题】:Spyder not launching in environmentSpyder 未在环境中启动
【发布时间】:2022-01-09 21:01:51
【问题描述】:

我为QCoDeS 设置了一个环境

但是当我尝试使用 conda install 安装 Spyder 时,即使在更新 conda 之后它也会一直冻结。我尝试通过 Navigator 安装,但它抱怨 Python 版本 (3.10) 并且无法安装。

我发现了一个建议,即安装 Spyder 和 pip install spyder 应该可以完成这项工作(是的,我知道冲突,但我已经没有选项了)

Spyder 安装并显示在已安装软件包列表中,但当我在 conda 命令行 (W10 x64) 输入 spyder 时无法识别。

这里发生了什么?我很茫然,我应该在我的环境中降级 Python 版本(怎么办?)?这会和QcoDeS 最初的环境原因混淆吗?

编辑:: 解决方案,如下所述,没有针对 Spyder 的 python 3.10 构建,因此,我删除了环境并使用 conda create -n qcodes python=3.9 重新创建。 Spyder 现在可以在环境中安装和运行,qcodes 与python 3.9 一起愉快地运行。

【问题讨论】:

    标签: python pip conda spyder


    【解决方案1】:

    目前还没有为 Spyder 提供 Python 3.10 构建,但是,Conda Forge 确实为 3.10 提供了 spyder-kernels 构建。这需要创建一个单独的环境,专门用于托管 Spyder 基础架构,然后在您希望在 Spyder 中使用的环境中安装 spyder-kernels。

    也就是说,类似

    ## install spyder-kernels in the env of interest
    conda install -n myenv -c conda-forge spyder-kernels
    
    ## create dedicated env for spyder
    conda create -n spyder spyder
    
    ## always launch spyder from that env
    conda activate spyder
    spyder
    
    ## switch kernels from GUI
    

    然后跟随Spyder documentation切换到感兴趣的内核。

    【讨论】:

    • 不幸的是,环境无法解决(冻结或灵活),然后我被告知 conda-forge 频道无法提供这些软件包
    • 两种环境中哪一种没有解决? myenv 或 spyder?
    • @DrBwts 如果您想更好地解决为什么失败,我找到了mamba can help with that。
    • @CarlosCordoba myenv 当我尝试 conda install -n myenv -c conda-forge spyder-kernels
    • 如果你只运行conda install -n myenv spyder-kernels会怎样?
    猜你喜欢
    • 2020-08-16
    • 2018-06-14
    • 2018-01-19
    • 2019-01-15
    • 1970-01-01
    • 2018-12-10
    • 1970-01-01
    • 2017-08-22
    • 2019-02-01
    相关资源
    最近更新 更多