Differences between revisions 1 and 2
Revision 1 as of 2016-04-11 18:08:26
Size: 796
Editor: vbind
Comment:
Revision 2 as of 2021-11-15 19:19:54
Size: 912
Editor: chapoton
Comment: refresh
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
{{https://avatars.githubusercontent.com/u/1284937?s=200&v=4||width=80px}}
Line 3: Line 5:
 * In 'Tools -> Preferences' go to 'Console -> Advanced settings -> Python executable'
 * choose SAGE_ROOT/local/bin/sage-python as the interpreter
 * go to 'Run -> Configure (F6)'
 * choose 'Console -> Execute in a new dedicated Python console'
 * optional: check 'Interact with the Python console after execution' (convenient for debugging)
 * In '''`Tools -> Preferences`''' go to '''`Console -> Advanced settings -> Python executable`'''
 * choose '''`SAGE_ROOT/local/bin/python`''' as the interpreter
 * go to '''`Run -> Configure (F6)`'''
 * choose '''`Console -> Execute in a new dedicated Python console`'''
 * optional: check '''`Interact with the Python console after execution`''' (convenient for debugging)
Line 9: Line 11:
Now you can run your scripts with 'Run (F5)' in Spyder's built-in console. Now you can run your scripts with '''`Run (F5)`''' in Spyder's built-in console.

https://avatars.githubusercontent.com/u/1284937?s=200&v=4

In order to use Spyder for writing Sage scripts you have to use the version of Python which comes with Sage within the IDE. To change it apply the following steps:

  • In Tools -> Preferences go to Console -> Advanced settings -> Python executable

  • choose SAGE_ROOT/local/bin/python as the interpreter

  • go to Run -> Configure (F6)

  • choose Console -> Execute in a new dedicated Python console

  • optional: check Interact with the Python console after execution (convenient for debugging)

Now you can run your scripts with Run (F5) in Spyder's built-in console.

Tested with Spyder 2.3.8 and Sage 7.1.

Open Issues

  • only works if the extension is .py
  • no integration of the Sage class/function documentation

SpyderInstructions (last edited 2022-04-06 02:22:15 by mkoeppe)