unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45655: Please use 'python3' command instead of 'python'
@ 2021-01-04 15:14 Balint Reczey
  2021-01-06 16:59 ` Glenn Morris
  2021-01-10 17:42 ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Balint Reczey @ 2021-01-04 15:14 UTC (permalink / raw)
  To: 45655

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

Hi,

Python 2 reached EOL about a year ago thus the 'python' command may be
missing on some systems.
'python3' is the standard way of invoking the Python 3 interpreter,
thus Emacs would have a better chance trying that.

The attached patch is already carried in Ubuntu.

Cheers,
Balint

[1] https://www.python.org/doc/sunset-python-2/

-- 
Balint Reczey
Ubuntu & Debian Developer

[-- Attachment #2: python3-as-default.patch --]
[-- Type: text/x-patch, Size: 799 bytes --]

Description: Run python3 command as default instead of python
Author: Balint Reczey <balint.reczey@canonical.com>
Origin: vendor
Forwarded: no
Last-Update: 2020-03-25

--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -26539,7 +26539,7 @@
 
 (add-to-list 'interpreter-mode-alist (cons (purecopy "python[0-9.]*") 'python-mode))
 
-(autoload 'run-python "python" "\
+(autoload 'run-python "python3" "\
 Run an inferior Python process.
 
 Argument CMD defaults to `python-shell-calculate-command' return
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1952,7 +1952,7 @@
   :group 'python
   :safe 'stringp)
 
-(defcustom python-shell-interpreter "python"
+(defcustom python-shell-interpreter "python3"
   "Default Python interpreter for shell."
   :type 'string
   :group 'python)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-11  5:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 15:14 bug#45655: Please use 'python3' command instead of 'python' Balint Reczey
2021-01-06 16:59 ` Glenn Morris
2021-01-06 17:47   ` Balint Reczey
2021-01-10 14:49     ` Lars Ingebrigtsen
2021-01-10 17:42 ` Stefan Monnier
2021-01-10 17:49   ` Balint Reczey
2021-01-10 20:48     ` Stefan Monnier
2021-01-11  5:17       ` Pankaj Jangid

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).