Ask Your Question

Is it possible to python3?

asked 2016-12-25 12:41:13 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I just learnt python3. But i came to know after installing sage that it use python2? Do I have a future in sage? I don't prefer to use the cloud, but the package i have?

What should I do now?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-12-26 13:40:47 -0500

The long-term plan is to move Sage to Python 3. Here's a couple Trac metatickets that show the progress:

In the mean time, just be aware of the major changes between the two versions and write Python 3-compatible code as much as possible.

edit flag offensive delete link more


To which one should note that the changes are relatively minor compared to, say, learning a different computer language!

kcrisman gravatar imagekcrisman ( 2016-12-26 17:50:03 -0500 )edit

that's fine, but now what am i supposed to do to use sagemath? constructive comments are welcome. And also answers @kcrisman@paulmasson

screened00 gravatar imagescreened00 ( 2016-12-27 12:06:48 -0500 )edit

The point is that nearly everything you know from Python 3 will be the same in Python 2. And many of the changes already "work" in the version of Python in Sage (see So you might as well get started with Sage!

kcrisman gravatar imagekcrisman ( 2016-12-28 09:03:28 -0500 )edit

answered 2017-05-03 20:58:45 -0500

cybervigilante gravatar image

Many important functions are backported to 2.7 from 3. Others can be enabled like so: from __future__ import print_function . That will give you the format of the python 3 print function. After that you can use the new print modifiers, i.e. print(value, ..., sep=' ', end='\n', file=sys.stdout)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-12-25 12:41:13 -0500

Seen: 396 times

Last updated: May 03