Revision history [back]

(For my taste, eclipse is the better IDE for developing code. There can be very many projects in it... The following is taken from the recommended path to start sage inside eclipse. Well my taste is not changed right in this second, but give me some more...)

The beautiful dark themes and the light interface of pycharm, dedicated to python, made me give it one more serious try. I cannot remember if there are any special configuration steps i did some months ago, but pycharm+sage work today without special effort. Here are the steps just done to run a simple piece of code. This is not really ubuntu, but manjaro, which is not far away, the same should apply in most linux operating systems.

1. Open a terminal and type sage -sh in it to get the sage environment. For me:

[dan@k7 ~]$which pycharm /usr/bin/pycharm [dan@k7 ~]$ sage -sh

Starting subshell with Sage environment variables set. Don't forget to exit when you are done. Beware:

• Do not do anything with other copies of Sage on your system.
• Do not use this for installing Sage packages using "sage -i" or for running "make" at Sage's root directory. These should be done outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/usr

2. From this shell with the (sage-sh) prompter start pycharm:

(sage-sh) dan@k7:~$pycharm & [1] 30437 3. Inside my pycharm there is now a test file named test012.py containing some lines of code from various area of interest. from sage.all import * F = GF(2) print F R = PolynomialRing( F, name='X' ) print R G = GL(3,F) print G.order() E = EllipticCurve( GF(2**53), [1,0,0,0,1] ) print "ORDER %s for %s" % ( E.order().factor(), E ) Only the first line is important, from sage.all import *. The rest is the test. Results in the pycharm console: /usr/bin/python2.7 /home/dan/PycharmProjects/test_01/test_012.py Finite Field of size 2 Univariate Polynomial Ring in X over Finite Field of size 2 (using NTL) 168 ORDER 2^2 * 107 * 21044858204113 for Elliptic Curve defined by y^2 + x*y = x^3 + 1 over Finite Field in z53 of size 2^53 Process finished with exit code 0  Hope it also works for you like a charm, enjoy! (For my taste, eclipse is the better IDE for developing code. There can be very many projects in it... The following is taken from the recommended path to start sage inside eclipse. Well my taste is not changed right in this second, but give me some more...) The beautiful dark themes and the light interface of pycharm, dedicated to python, made me give it one more serious try. I cannot remember if there are any special configuration steps i did some months ago, but pycharm+sage work today without special effort. Here are the steps just done to run a simple piece of code. This is not really ubuntu, but manjaro, which is not far away, the same should apply in most linux operating systems. 1. Open a terminal and type sage -sh in it to get the sage environment. For me: [dan@k7 ~]$ which pycharm
/usr/bin/pycharm
[dan@k7 ~]$sage -sh -sh Starting subshell with Sage environment variables set. Don't forget to exit when you are done. Beware: Beware: * Do not do anything with other copies of Sage on your system. system. * Do not use this for installing Sage packages using "sage -i" or for running "make" at Sage's root directory. These should be done outside the Sage shell. shell. Bypassing shell configuration files... files... Note: SAGE_ROOT=/usrSAGE_ROOT=/usr  2. From this shell with the (sage-sh) prompter start pycharm: (sage-sh) dan@k7:~$ pycharm &
[1] 3043730437

3. Inside my pycharm there is now a test file named test012.py containing some lines of code from various area of interest.

from sage.all import * *

F = GF(2)
print F F

R = PolynomialRing( F, name='X' )
print R R

G = GL(3,F)
print G.order() G.order()

E = EllipticCurve( GF(2**53), [1,0,0,0,1] )
print "ORDER %s for %s" % ( E.order().factor(), E )
4.  
) 

Only the first line is important, from from sage.all import *. *. The rest is the test. Results in the pycharm console:

/usr/bin/python2.7 /home/dan/PycharmProjects/test_01/test_012.py
Finite Field of size 2
Univariate Polynomial Ring in X over Finite Field of size 2 (using NTL)
168
ORDER 2^2 * 107 * 21044858204113 for Elliptic Curve defined by y^2 + x*y = x^3 + 1 over Finite Field in z53 of size 2^53


Process finished with exit code 0 0

Hope it also works for you like a charm, enjoy!

(For my taste, eclipse is the better IDE for developing code. There can be very many projects in it... The following is taken from the recommended path to start sage inside eclipse. Well my taste is not changed right in this second, but give me some more...)

The beautiful dark themes and the light interface of pycharm, dedicated to python, made me give it one more serious try. I cannot remember if there are any special configuration steps i did some months ago, but pycharm+sage work today without special effort. Here are the steps just done to run a simple piece of code. This is not really ubuntu, but manjaro, which is not far away, the same should apply in most linux operating systems.

1. Open a terminal and type sage -sh in it to get the sage environment. For me:

[dan@k7 ~]$which pycharm /usr/bin/pycharm [dan@k7 ~]$ sage -sh

Starting subshell with Sage environment variables set.  Don't forget
to exit when you are done.  Beware:
* Do not do anything with other copies of Sage on your system.
* Do not use this for installing Sage packages using "sage -i" or for
running "make" at Sage's root directory.  These should be done
outside the Sage shell.

Bypassing shell configuration files...

Note: SAGE_ROOT=/usr

2. From this shell with the (sage-sh) prompter start pycharm:

(sage-sh) dan@k7:~$pycharm & [1] 30437  3. Inside my pycharm there is now a test file named test012.py containing some lines of code from various area of interest. from sage.all import * F = GF(2) print F R = PolynomialRing( F, name='X' ) print R G = GL(3,F) print G.order() E = EllipticCurve( GF(2**53), [1,0,0,0,1] ) print "ORDER %s for %s" % ( E.order().factor(), E )  Only the first line is important, from sage.all import *. The rest is the test. Results in the pycharm console: /usr/bin/python2.7 /home/dan/PycharmProjects/test_01/test_012.py Finite Field of size 2 Univariate Polynomial Ring in X over Finite Field of size 2 (using NTL) 168 ORDER 2^2 * 107 * 21044858204113 for Elliptic Curve defined by y^2 + x*y = x^3 + 1 over Finite Field in z53 of size 2^53  Process finished with exit code 0 0 Hope it also works for you like a charm, enjoy! (For my taste, eclipse is the better IDE for developing code. There can be very many projects in it... The following is taken from the recommended path to start sage inside eclipse. Well my taste is not changed right in this second, but give me some more...) The beautiful dark themes and the light interface of pycharm, dedicated to python, made me give it one more serious try. I cannot remember if there are any special configuration steps i did some months ago, but pycharm+sage work today without special effort. Here are the steps just done to run a simple piece of code. This is not really ubuntu, but manjaro, which is not far away, the same should apply in most linux operating systems. 1. Open a terminal and type sage -sh in it to get the sage environment. For me: [dan@k7 ~]$ which pycharm
/usr/bin/pycharm
[dan@k7 ~]$sage -sh Starting subshell with Sage environment variables set. Don't forget to exit when you are done. Beware: * Do not do anything with other copies of Sage on your system. * Do not use this for installing Sage packages using "sage -i" or for running "make" at Sage's root directory. These should be done outside the Sage shell. Bypassing shell configuration files... Note: SAGE_ROOT=/usr  2. From this shell with the (sage-sh) prompter start pycharm: (sage-sh) dan@k7:~$ pycharm &
[1] 30437

3. Inside my pycharm there is now a test file named test012.py containing some lines of code from various area areas of interest.

from sage.all import *

F = GF(2)
print F

R = PolynomialRing( F, name='X' )
print R

G = GL(3,F)
print G.order()

E = EllipticCurve( GF(2**53), [1,0,0,0,1] )
print "ORDER %s for %s" % ( E.order().factor(), E )


Only the first line is important, from sage.all import *. The rest is the test. Results in the pycharm console:

/usr/bin/python2.7 /home/dan/PycharmProjects/test_01/test_012.py
Finite Field of size 2
Univariate Polynomial Ring in X over Finite Field of size 2 (using NTL)
168
ORDER 2^2 * 107 * 21044858204113 for Elliptic Curve defined by y^2 + x*y = x^3 + 1 over Finite Field in z53 of size 2^53

Process finished with exit code 0


Hope it also works for you like a charm, enjoy!