Ask Your Question
1

Is it possible to use python3?

asked 2016-12-25 19:41:13 +0200

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
4

answered 2016-12-26 20:40:47 +0200

updated 2018-12-20 18:41:25 +0200

FrédéricC gravatar image

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

Comments

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

kcrisman gravatar imagekcrisman ( 2016-12-27 00:50:03 +0200 )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 19:06:48 +0200 )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 https://docs.python.org/3.0/whatsnew/...). So you might as well get started with Sage!

kcrisman gravatar imagekcrisman ( 2016-12-28 16:03:28 +0200 )edit
1

answered 2017-05-04 03:58:45 +0200

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

Stats

Asked: 2016-12-25 19:41:13 +0200

Seen: 5,451 times

Last updated: Dec 20 '18