Error: Starting sage in the eclipse IDE (linux, after sage -sh in terminal, followed by eclipse &, and using pyDev plugin) - Error: Unable to get info on the interpreter
Some years ago, there was a good possibility to start sage in eclipse and develop code with a better immediate feed back, and syntax highlight. (emacs can do this too, but...) The debug support makes it also possible to be quick and efficient, it is the main reason i need eclipse.
It still works on my very old computers running Ubuntu or mint and an old eclipse.
Now the situation has changed, after eclipse "improved" the install process by additional checkings.
The interpreter sage
cannot be defined, for some check cannot be performed.
What am i doing?
In a terminal, the right sage settings are published via:
sage -sh
Then from the command line:
[dan@... ~]$ 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
(sage-sh) dan@...:~$ eclipse &
[1] 31490
(sage-sh) dan@...:~$ org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
... and so on ...
(sage-sh) dan@... :~$ uname -a
Linux ... 4.9.20-1-MANJARO #1 SMP PREEMPT Fri Mar 31 20:42:21 UTC 2017 i686 GNU/Linux
In eclipse neon, there is no chance to configure the interpreter for the executable:
(sage-sh) dan@... :~$ which sage
/usr/bin/sage
via PyDev > Python Interpreter > New > ...
And the reason is (typed by own hands, since copy+paste does not work):
Unable to get info on the interpreter: /usr/bin/sage
Common reasons include...
and so on.
Does anybody have a solution to this issue? Thanks in advance!
Note:
Yes, it is possible to configure the interpreter located at /usr/bin/sage-python
, but then there is still some yoga needed, almost every fifth line written has to be changed, e.g. 2^3
into 2 ** 3
and R.<X> = QQ[]
into R = PolynomialRing( QQ, name='X' )
and so on...
Just to note that if you use that then you lose all the preparsing, some of which is quite annoying not just for entry - for instance, the
2**3
will probably not be using Sage integers.@kcrisman thanks, yes this is often the problem.
The error has the following Details >>
The file
/usr/bin/sage-run
has the following content:and further lines. It seems that this is the reason for the error.