简体   繁体   English

Sage REPL指定IPython二进制文件

[英]Sage REPL Specify IPython Binary

Sage only works with python2, but I'm running python3 on my system in a virtual environment. Sage只适用于python2,但我在虚拟环境中运行python3。 Whenever I try to start the sage REPL, it fails saying module "sage" not found. 每当我尝试启动鼠尾草REPL时,都无法说未找到模块“sage”。 When I open python2 directly and import sage, it works. 当我直接打开python2并导入sage时,它可以工作。 So it seems like sage is trying to use python3 and failing. 所以看起来圣人试图使用python3并失败。 It's probably using my PATH env variable, but I don't want to change this every time I start up the REPL. 它可能正在使用我的PATH env变量,但我不希望每次启动REPL时都改变它。 How can I tell it to use a specific version of python/ipython? 如何告诉它使用特定版本的python / ipython?

You could run the Sage REPL from the Sage shell (run sage -sh and start the Sage REPL from there). 您可以从Sage shell运行Sage REPL(运行sage -sh并从那里启动Sage REPL)。 Then it would use Sage's Python. 然后它将使用Sage的Python。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM