【问题标题】:Using sage in python在 python 中使用鼠尾草
【发布时间】:2020-12-23 20:54:34
【问题描述】:

我对如何在 python 中使用 sagemath 感到困惑,我只知道你不能这样做pip install sagemath

https://stackoverflow.com/questions/50039916/no-module-named-sage-all?r=SearchResults&s=2|57.7562

我能找到的只有文章说使用from sage.all import *,这会产生错误ModuleNotFoundError: No module named 'sage.all'

不胜感激,谢谢!

【问题讨论】:

  • 这能回答你的问题吗? No module named 'sage.all'
  • 您链接到的帖子回答了您的问题;你到底想问什么?
  • @ReblochonMasque 也许我遗漏了一些明显的东西,但我不明白如何解决上述错误
  • 我也尝试在 colab 上安装 sage,但它显示没有模块 sage.graphs。我需要导入有向图。我跑了! pip install sagemath sage-package

标签: python python-3.x sage


【解决方案1】:

根据comments in the other question,使用conda(不是pip)安装sagemath,并使用相同的代码:

from sage.all import *

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多