all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Thorpe <rt@robertthorpeconsulting.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 54860@debbugs.gnu.org
Subject: bug#54860: 28.1; Problem with run-python
Date: Thu, 14 Apr 2022 02:36:18 +0100	[thread overview]
Message-ID: <878rs8tpil.fsf@robertthorpeconsulting.com> (raw)
In-Reply-To: <83a6cr5y10.fsf@gnu.org> (message from Eli Zaretskii on Mon, 11 Apr 2022 20:29:31 +0300)

I found the problem.  It's not Emacs so you can close the bug.

It was Microsofts' "App Execution Aliases" system.  When I installed
Python it seems to have been activated.

I thought I could change the settings in "Manage App Execution Aliases"
then repeatedly retry M-x run-python in the same Emacs.  It doesn't work
like that though.  Emacs creates the path to python executable in a
defcustom when python.el is started.  At that time it captures the app
execution alias and stores it.  So, once python.el has started changing
the aliases has no effect.

Turning off all the app execution aliases and restarting Emacs solved
it.

I think the reason that 27.2 had worked was just that the instance of
Emacs had started before I installed Python 3.9.  So, the path to the
python executable had not been interferred with.

BR,
Robert Thorpe

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Robert Thorpe <rt@robertthorpeconsulting.com>
>> Date: Mon, 11 Apr 2022 17:54:56 +0100
>> 
>> 
>> I recently upgraded to Emacs 28.1 on Microsoft Windows.  I'm having
>> problems with Inferior Python mode.  On Emacs 27.2 that mode works.
>> However, it doesn't work on Emacs 28.1, not even from emacs -Q.
>> 
>> Reproduction is easy, from emacs -Q do "M-x run-python" on a Windows 10
>> machine.
>> 
>> The variable exec-path contains the path to the python interpreter
>> ("C:/Program Files/Python39/").  Emacs is correctly picking up the
>> components of exec-path from my PATH environmental variable.
>> 
>> However, run-python gives the error:
>> "Python was not found; run with arguments to install from the Microsoft
>> Store, or disable this shortcut from Setting > Manage App Execution
>> Aliases.
>> 
>> Process Python exited abnormally with code 49"
>
> I cannot reproduce this here.  Could it be that the spaces in
> "Program Files" are somehow the culprit?  (On my system Python is
> installed in a directory without embedded blanks.)
>
> If nothing gives a clue, can you step with Edebug through run-python
> and its subroutines, and see what command is invoked by Emacs and how
> it fails?
>
> Thanks.





  reply	other threads:[~2022-04-14  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 16:54 bug#54860: 28.1; Problem with run-python Robert Thorpe
2022-04-11 17:29 ` Eli Zaretskii
2022-04-14  1:36   ` Robert Thorpe [this message]
2022-04-14  6:19     ` Eli Zaretskii
2022-04-15  3:58     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rs8tpil.fsf@robertthorpeconsulting.com \
    --to=rt@robertthorpeconsulting.com \
    --cc=54860@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.